[][src]Struct kes::context::Context

pub struct Context<'c> {
    pub variables: AHashMap<Symbol, Value>,
    // some fields omitted
}

Script Context type

you can run Program with Builtin

Fields

variables: AHashMap<Symbol, Value>

Implementations

impl<'c> Context<'c>[src]

pub fn new(program: &'c Program) -> Self[src]

pub fn args(&self) -> &[Value][src]

pub fn pop_into<T: TryFrom<Value>>(&mut self) -> T where
    T::Error: Debug
[src]

pub fn pop_into_ret<T: TryFrom<Value, Error = ValueConvertError>>(
    &mut self
) -> RuntimeResult<T>
[src]

pub fn peek(&mut self) -> Option<&mut Value>[src]

pub fn pop_u32(&mut self) -> u32[src]

pub fn pop_bool(&mut self) -> bool[src]

pub fn pop_str(&mut self) -> String[src]

pub fn run_bin_operator(&mut self, op: BinaryOperator) -> RuntimeResult<()>[src]

pub fn flush_print<B: Builtin>(&mut self, builtin: &mut B)[src]

pub fn pop_ret(&mut self) -> RuntimeResult<Value>[src]

pub fn peek_ret(&mut self) -> RuntimeResult<&mut Value>[src]

pub async fn run_instruction<B: Builtin, '_, '_>(
    &'_ mut self,
    builtin: &'_ mut B,
    inst: InstructionWithDebug
) -> RuntimeResult<()>
[src]

pub async fn run<B: Builtin>(self, builtin: B) -> RuntimeResult<()>[src]

Auto Trait Implementations

impl<'c> RefUnwindSafe for Context<'c>

impl<'c> Send for Context<'c>

impl<'c> Sync for Context<'c>

impl<'c> Unpin for Context<'c>

impl<'c> UnwindSafe for Context<'c>

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.