[−][src]Struct runestick::Context
Static run context visible to the virtual machine.
This contains:
- Declared functions.
- Declared instance functions.
- Type definitions.
Implementations
impl Context
[src]
pub fn new() -> Self
[src]
Construct a new empty collection of functions.
pub fn type_check_for(&self, item: &Item) -> Option<TypeCheck>
[src]
Use the specified type check.
pub fn with_default_modules() -> Result<Self, ContextError>
[src]
Construct a new collection of functions with default packages installed.
pub fn iter_components<'a, I>(
&'a self,
iter: I
) -> impl Iterator<Item = &'a Component> where
I: IntoIterator,
I::Item: Into<Component>,
[src]
&'a self,
iter: I
) -> impl Iterator<Item = &'a Component> where
I: IntoIterator,
I::Item: Into<Component>,
Iterate over known child components of the given name.
pub fn unit_type(&self) -> Option<Hash>
[src]
Access the currently known unit type.
pub fn contains_name(&self, item: &Item) -> bool
[src]
Check if unit contains the given name.
pub fn contains_prefix(&self, item: &Item) -> bool
[src]
Check if unit contains the given name by prefix.
pub fn lookup_meta(&self, name: &Item) -> Option<Meta>
[src]
Access the meta for the given language item.
pub fn iter_functions(&self) -> impl Iterator<Item = (Hash, &FnSignature)>
[src]
Iterate over all available functions
pub fn iter_types(&self) -> impl Iterator<Item = (Hash, &ContextTypeInfo)>
[src]
Iterate over all available types.
pub fn install(&mut self, module: &Module) -> Result<(), ContextError>
[src]
Install the specified module.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,