pub struct Context { /* private fields */ }Expand description
Static run context visible to the virtual machine.
This contains:
- Declared functions.
- Declared instance functions.
- Type definitions.
Implementations§
Source§impl Context
impl Context
Sourcepub fn with_default_packages() -> Result<Self, ContextError>
pub fn with_default_packages() -> Result<Self, ContextError>
Construct a new collection of functions with default packages installed.
Sourcepub fn iter_functions(&self) -> impl Iterator<Item = (Hash, &FnSignature)>
pub fn iter_functions(&self) -> impl Iterator<Item = (Hash, &FnSignature)>
Iterate over all available functions
Sourcepub fn iter_types(&self) -> impl Iterator<Item = (Hash, &TypeInfo)>
pub fn iter_types(&self) -> impl Iterator<Item = (Hash, &TypeInfo)>
Iterate over all available types.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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