Skip to main content

EnvNode

Struct EnvNode 

Source
pub struct EnvNode {
    pub parent: EnvId,
    pub val: V,
    pub len: u32,
    pub open: bool,
    pub frame: bool,
    pub live: u64,
    pub dense: bool,
    pub pmask: u64,
    pub pres: u32,
    pub wide: u32,
    pub lsub: SubstId,
}
Expand description

An environment node: either one entry consed onto a parent environment, or a frame — a pruned environment of len entries holding only the entries an expression can see, stored contiguously from val (an index into the frame slots). A narrow frame (every live index below 64) finds an entry by its rank in live; a wide frame keeps its live indices as a sorted list (wide, an index into the wide-index table) and finds an entry by search.

Every environment also carries the universe substitution its terms are read under (lsub): a universe-polymorphic constant’s type and body are evaluated from its own terms, under the substitution of one use’s levels for its parameters, without building an instantiated copy. An extension inherits its parent’s; the empty environment of each substitution is its base.

Fields§

§parent: EnvId§val: V§len: u32§open: bool§frame: bool§live: u64

Which of the innermost 64 entries are not DEAD.

§dense: bool

No entry at all is DEAD.

§pmask: u64

The last pruning of this environment: the mask asked for and the result.

§pres: u32§wide: u32

For a wide frame, where its index list starts in the wide-index table (count first).

§lsub: SubstId

The universe substitution this environment’s terms are read under.

Trait Implementations§

Source§

impl Clone for EnvNode

Source§

fn clone(&self) -> EnvNode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EnvNode

Auto Trait Implementations§

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<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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.