pub struct ExprRef(/* private fields */);Expand description
A typed wrapper around ArenaIndex representing an expression to evaluate.
Expressions are S-expressions stored in the arena. Using a distinct type prevents accidentally passing an environment where an expression is expected.
Implementations§
Source§impl ExprRef
impl ExprRef
Sourcepub const fn index(self) -> ArenaIndex
pub const fn index(self) -> ArenaIndex
Get the underlying ArenaIndex.
Sourcepub const fn new(idx: ArenaIndex) -> Self
pub const fn new(idx: ArenaIndex) -> Self
Create an ExprRef from a raw ArenaIndex.
Trait Implementations§
Source§impl From<ArenaIndex> for ExprRef
impl From<ArenaIndex> for ExprRef
Source§fn from(idx: ArenaIndex) -> Self
fn from(idx: ArenaIndex) -> Self
Converts to this type from the input type.
Source§impl From<ExprRef> for ArenaIndex
impl From<ExprRef> for ArenaIndex
impl Copy for ExprRef
impl Eq for ExprRef
impl StructuralPartialEq for ExprRef
Auto Trait Implementations§
impl Freeze for ExprRef
impl RefUnwindSafe for ExprRef
impl Send for ExprRef
impl Sync for ExprRef
impl Unpin for ExprRef
impl UnwindSafe for ExprRef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more