[][src]Struct rant::runtime::VM

pub struct VM<'rant> { /* fields omitted */ }

Implementations

impl<'rant> VM<'rant>[src]

pub fn new(
    rng: Rc<RantRng>,
    engine: &'rant mut Rant,
    program: &'rant RantProgram
) -> Self
[src]

impl<'rant> VM<'rant>[src]

pub fn run(&mut self) -> RuntimeResult<RantValue>[src]

Runs the program.

pub fn run_with<A>(&mut self, args: A) -> RuntimeResult<RantValue> where
    A: Into<Option<HashMap<String, RantValue>>>, 
[src]

Runs the program with arguments.

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

Checks for an active block and attempts to iterate it. If a valid element is returned, it is pushed onto the call stack.

pub fn push_block(
    &mut self,
    block: &Block,
    flag: PrintFlag
) -> RuntimeResult<()>
[src]

pub fn get_var_value(
    &self,
    varname: &str,
    access: AccessPathKind,
    prefer_function: bool
) -> RuntimeResult<RantValue>
[src]

pub fn def_var_value(
    &mut self,
    varname: &str,
    access: AccessPathKind,
    val: RantValue
) -> RuntimeResult<()>
[src]

pub fn push_val(&mut self, val: RantValue) -> RuntimeResult<usize>[src]

pub fn pop_val(&mut self) -> RuntimeResult<RantValue>[src]

pub fn pop_frame(&mut self) -> RuntimeResult<StackFrame>[src]

pub fn push_frame(
    &mut self,
    callee: Rc<Sequence>,
    use_output: bool
) -> RuntimeResult<()>
[src]

pub fn push_empty_frame(
    &mut self,
    callee: Box<dyn FnOnce(&mut VM<'_>) -> RuntimeResult<()>>,
    use_output: bool,
    flavor: StackFrameFlavor
) -> RuntimeResult<()>
[src]

pub fn push_frame_flavored(
    &mut self,
    callee: Rc<Sequence>,
    use_output: bool,
    flavor: StackFrameFlavor
) -> RuntimeResult<()>
[src]

pub fn interrupt_repeater(
    &mut self,
    break_val: Option<RantValue>,
    should_continue: bool
) -> RuntimeResult<()>
[src]

pub fn func_return(&mut self, ret_val: Option<RantValue>) -> RuntimeResult<()>[src]

pub fn cur_frame_mut(&mut self) -> &mut StackFrame[src]

pub fn cur_frame(&self) -> &StackFrame[src]

pub fn rng(&self) -> &RantRng[src]

pub fn rng_clone(&self) -> Rc<RantRng>[src]

pub fn push_rng(&mut self, rng: Rc<RantRng>)[src]

pub fn pop_rng(&mut self) -> Option<Rc<RantRng>>[src]

pub fn context(&self) -> &Rant[src]

pub fn context_mut(&mut self) -> &mut Rant[src]

pub fn resolver(&self) -> &Resolver[src]

pub fn resolver_mut(&mut self) -> &mut Resolver[src]

pub fn program(&self) -> &RantProgram[src]

Auto Trait Implementations

impl<'rant> !RefUnwindSafe for VM<'rant>

impl<'rant> !Send for VM<'rant>

impl<'rant> !Sync for VM<'rant>

impl<'rant> Unpin for VM<'rant>

impl<'rant> !UnwindSafe for VM<'rant>

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>,