Struct gluon_base::ast::RootExpr

source ·
pub struct RootExpr<Id: 'static> { /* private fields */ }

Implementations§

source§

impl<Id> RootExpr<Id>

source

pub fn new<'ast>( arena: Arc<Arena<'ast, Id>>, expr: &'ast mut SpannedExpr<'ast, Id> ) -> Self

source

pub fn with_arena<R>( &mut self, f: impl for<'ast> FnOnce(&'ast Arena<'ast, Id>, &'ast mut SpannedExpr<'ast, Id>) -> R ) -> R

source

pub fn expr(&self) -> &SpannedExpr<'_, Id>

source

pub fn expr_mut(&mut self) -> &mut SpannedExpr<'_, Id>

source

pub fn arena_expr(&mut self) -> (&Arena<'_, Id>, &mut SpannedExpr<'_, Id>)

source

pub fn try_into_send(self) -> Result<OwnedExpr<Id>, Self>

Trait Implementations§

source§

impl<Id: Debug> Debug for RootExpr<Id>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Id: 'static> Default for RootExpr<Id>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<Id: PartialEq> PartialEq for RootExpr<Id>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Typed for RootExpr<Symbol>

§

type Ident = Symbol

source§

fn try_type_of( &self, env: &dyn TypeEnv<Type = ArcType> ) -> Result<ArcType, String>

source§

fn env_type_of(&self, env: &dyn TypeEnv<Type = ArcType>) -> ArcType<Self::Ident>

source§

impl<Id: Eq> Eq for RootExpr<Id>

Auto Trait Implementations§

§

impl<Id> !RefUnwindSafe for RootExpr<Id>

§

impl<Id> !Send for RootExpr<Id>

§

impl<Id> !Sync for RootExpr<Id>

§

impl<Id> Unpin for RootExpr<Id>

§

impl<Id> !UnwindSafe for RootExpr<Id>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<Id> AsId<Id> for Id
where Id: ?Sized,

source§

fn as_id(&self) -> &Id

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Any for T
where T: Any,