[][src]Struct runestick::Context

pub struct Context { /* fields omitted */ }

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_packages() -> Result<Self, ContextError>[src]

Construct a new collection of functions with default packages installed.

pub fn unit_type(&self) -> Option<Hash>[src]

Access the currently known unit type.

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, &TypeInfo)>[src]

Iterate over all available types.

pub fn install(&mut self, module: &Module) -> Result<(), ContextError>[src]

Install the specified module.

Trait Implementations

impl Debug for Context[src]

impl Default for Context[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,