pub struct Env { /* private fields */ }Expand description
env: read-only access to the environment the host supplies.
The map is given to the constructor rather than read from the process, so a host decides exactly which variables a run can observe.
Implementations§
Trait Implementations§
Source§impl HostApi for Env
impl HostApi for Env
Source§fn module_schema(&self) -> ModuleSchema
fn module_schema(&self) -> ModuleSchema
The whole of what this module declares about itself: the name Cove
source uses, the capability a host must grant for it, the operations
it exposes, the types it declares, and the kinds of resource it can
open. Read more
Source§fn call(&self, op: &str, args: Vec<Value>) -> Result<Value, RuntimeError>
fn call(&self, op: &str, args: Vec<Value>) -> Result<Value, RuntimeError>
Invokes one operation.
Source§fn call_with(
&self,
op: &str,
args: Vec<Value>,
back: &mut dyn Reentry,
) -> Result<Value, RuntimeError>
fn call_with( &self, op: &str, args: Vec<Value>, back: &mut dyn Reentry, ) -> Result<Value, RuntimeError>
Invokes one operation. Read more
Source§fn call_resource(
&self,
handle: &ResourceHandle,
op: &str,
args: Vec<Value>,
back: &mut dyn Reentry,
) -> Result<Value, RuntimeError>
fn call_resource( &self, handle: &ResourceHandle, op: &str, args: Vec<Value>, back: &mut dyn Reentry, ) -> Result<Value, RuntimeError>
Invokes one operation on a handle this module issued. Read more
Auto Trait Implementations§
impl Freeze for Env
impl RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnsafeUnpin for Env
impl UnwindSafe for Env
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