[−][src]Struct kes::context::Context
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]
T::Error: Debug,
pub fn pop_into_ret<T: TryFrom<Value, Error = ValueConvertError>>(
&mut self
) -> RuntimeResult<T>
[src]
&mut self
) -> RuntimeResult<T>
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]
&'_ mut self,
builtin: &'_ mut B,
inst: InstructionWithDebug
) -> RuntimeResult<()>
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]
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,
pub 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.
pub 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>,