[−][src]Struct foolang::eval::Env
Lexical environment. Exists around EnvImpl
to provide access to
the Rc
.
Fields
env_ref: EnvRef
Underlying environment.
foo: Rc<Foolang>
Vtables for builtin classes.
Methods
impl Env
[src]
pub fn extend(
&self,
symbols: HashMap<String, Binding>,
receiver: Option<&Object>
) -> Env
[src]
&self,
symbols: HashMap<String, Binding>,
receiver: Option<&Object>
) -> Env
Creates a new environment enclosed by this one, containing
symbols
, receiver
, and closure
as the home.
pub fn define(&self, name: &str, value: Object)
[src]
pub fn add_binding(&self, name: &str, binding: Binding)
[src]
pub fn set(&self, name: &str, value: Object) -> Option<Eval>
[src]
pub fn get(&self, name: &str) -> Option<Object>
[src]
pub fn eval_all(&self, source: &str) -> Eval
[src]
pub fn eval(&self, expr: &Expr) -> Eval
[src]
pub fn maybe_type(
&self,
maybe_name: &Option<String>
) -> Result<Option<Rc<Vtable>>, Unwind>
[src]
&self,
maybe_name: &Option<String>
) -> Result<Option<Rc<Vtable>>, Unwind>
pub fn find_type(&self, name: &str) -> Result<Rc<Vtable>, Unwind>
[src]
pub fn find_class(&self, name: &str) -> Result<Rc<Class>, Unwind>
[src]
pub fn find_interface(&self, name: &str) -> Result<Rc<Class>, Unwind>
[src]
pub fn find_global(&self, name: &str) -> Option<Object>
[src]
pub fn find_global_or_unwind(&self, name: &str) -> Eval
[src]
pub fn import_everything(&self, module: &Env) -> Eval
[src]
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,