[][src]Struct rust_lisp::model::Env

pub struct Env {
    pub parent: Option<Rc<RefCell<Env>>>,
    pub entries: HashMap<String, Value>,
}

An environment of symbol bindings. Used for the base environment, for closures, for let statements, for function arguments, etc.

Fields

parent: Option<Rc<RefCell<Env>>>entries: HashMap<String, Value>

Implementations

impl Env[src]

pub fn find(&self, symbol: &str) -> Option<Value>[src]

Walks up the environment hierarchy until it finds the symbol's value or runs out of environments.

Trait Implementations

impl Debug for Env[src]

impl Display for Env[src]

Auto Trait Implementations

impl !RefUnwindSafe for Env

impl !Send for Env

impl !Sync for Env

impl Unpin for Env

impl !UnwindSafe for Env

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.