pub struct Environment { /* private fields */ }
Expand description
The environment that expressions are evaluated in.
Implementations§
Source§impl Environment
impl Environment
Sourcepub fn with_binds(bindings: HashMap<String, Ast>) -> Self
pub fn with_binds(bindings: HashMap<String, Ast>) -> Self
Create an environment with the specified bindings at the outermost scope.
Sourcepub fn new_scope(&mut self, bindings: HashMap<String, Ast>)
pub fn new_scope(&mut self, bindings: HashMap<String, Ast>)
Add an empty scope to the environment.
Trait Implementations§
Source§impl From<Environment> for JsValue
impl From<Environment> for JsValue
Source§fn from(value: Environment) -> Self
fn from(value: Environment) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for Environment
impl FromWasmAbi for Environment
Source§impl IntoWasmAbi for Environment
impl IntoWasmAbi for Environment
Source§impl LongRefFromWasmAbi for Environment
impl LongRefFromWasmAbi for Environment
Source§impl OptionFromWasmAbi for Environment
impl OptionFromWasmAbi for Environment
Source§impl OptionIntoWasmAbi for Environment
impl OptionIntoWasmAbi for Environment
Source§impl RefFromWasmAbi for Environment
impl RefFromWasmAbi for Environment
Source§type Anchor = RcRef<Environment>
type Anchor = RcRef<Environment>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for Environment
impl RefMutFromWasmAbi for Environment
Source§impl TryFromJsValue for Environment
impl TryFromJsValue for Environment
Source§impl VectorFromWasmAbi for Environment
impl VectorFromWasmAbi for Environment
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Environment]>
Source§impl VectorIntoJsValue for Environment
impl VectorIntoJsValue for Environment
fn vector_into_jsvalue(vector: Box<[Environment]>) -> JsValue
Source§impl VectorIntoWasmAbi for Environment
impl VectorIntoWasmAbi for Environment
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Environment]>) -> Self::Abi
Source§impl WasmDescribeVector for Environment
impl WasmDescribeVector for Environment
impl SupportsConstructor for Environment
impl SupportsInstanceProperty for Environment
impl SupportsStaticProperty for Environment
Auto Trait Implementations§
impl Freeze for Environment
impl !RefUnwindSafe for Environment
impl !Send for Environment
impl !Sync for Environment
impl Unpin for Environment
impl !UnwindSafe for Environment
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.