pub struct EnvRef(/* private fields */);Expand description
A typed wrapper around ArenaIndex representing an environment chain.
Environments are linked lists of (name . value) bindings stored in the
arena. Using a distinct type prevents accidentally passing an expression
where an environment is expected.
Implementations§
Source§impl EnvRef
impl EnvRef
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 EnvRef from a raw ArenaIndex.
Trait Implementations§
Source§impl From<ArenaIndex> for EnvRef
impl From<ArenaIndex> for EnvRef
Source§fn from(idx: ArenaIndex) -> Self
fn from(idx: ArenaIndex) -> Self
Converts to this type from the input type.
Source§impl From<EnvRef> for ArenaIndex
impl From<EnvRef> for ArenaIndex
impl Copy for EnvRef
impl Eq for EnvRef
impl StructuralPartialEq for EnvRef
Auto Trait Implementations§
impl Freeze for EnvRef
impl RefUnwindSafe for EnvRef
impl Send for EnvRef
impl Sync for EnvRef
impl Unpin for EnvRef
impl UnwindSafe for EnvRef
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