Struct gluon_base::ast::OwnedExpr

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

Implementations§

source§

impl<Id> OwnedExpr<Id>

source

pub fn with_arena<R>( &mut self, f: impl for<'ast> FnOnce(OwnedArena<'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) -> (OwnedArena<'_, Id>, &mut SpannedExpr<'_, Id>)

Trait Implementations§

source§

impl<Id: Debug> Debug for OwnedExpr<Id>

source§

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

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

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

source§

fn default() -> Self

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

impl<Id: PartialEq> PartialEq<OwnedExpr<Id>> for OwnedExpr<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 OwnedExpr<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 OwnedExpr<Id>

source§

impl<Id> Send for OwnedExpr<Id>where Id: Send, SpannedExpr<'static, Id>: Send,

Since the Arena is no longer accessible it if self is the only owner of the arena we can implement Send and Sync

source§

impl<Id> Sync for OwnedExpr<Id>where Id: Sync, SpannedExpr<'static, Id>: Sync,

Auto Trait Implementations§

§

impl<Id> !RefUnwindSafe for OwnedExpr<Id>

§

impl<Id> Unpin for OwnedExpr<Id>where Id: Unpin,

§

impl<Id> !UnwindSafe for OwnedExpr<Id>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn as_id(&self) -> &Id

source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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.