[−][src]Struct rant::runtime::VM
Implementations
impl<'rant> VM<'rant>
[src]
pub fn new(
rng: Rc<RantRng>,
engine: &'rant mut Rant,
program: &'rant RantProgram
) -> Self
[src]
rng: Rc<RantRng>,
engine: &'rant mut Rant,
program: &'rant RantProgram
) -> Self
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]
A: Into<Option<HashMap<String, RantValue>>>,
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]
&mut self,
block: &Block,
flag: PrintFlag
) -> RuntimeResult<()>
pub fn get_var_value(
&self,
varname: &str,
access: AccessPathKind,
prefer_function: bool
) -> RuntimeResult<RantValue>
[src]
&self,
varname: &str,
access: AccessPathKind,
prefer_function: bool
) -> RuntimeResult<RantValue>
pub fn def_var_value(
&mut self,
varname: &str,
access: AccessPathKind,
val: RantValue
) -> RuntimeResult<()>
[src]
&mut self,
varname: &str,
access: AccessPathKind,
val: RantValue
) -> RuntimeResult<()>
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]
&mut self,
callee: Rc<Sequence>,
use_output: bool
) -> RuntimeResult<()>
pub fn push_empty_frame(
&mut self,
callee: Box<dyn FnOnce(&mut VM<'_>) -> RuntimeResult<()>>,
use_output: bool,
flavor: StackFrameFlavor
) -> RuntimeResult<()>
[src]
&mut self,
callee: Box<dyn FnOnce(&mut VM<'_>) -> RuntimeResult<()>>,
use_output: bool,
flavor: StackFrameFlavor
) -> RuntimeResult<()>
pub fn push_frame_flavored(
&mut self,
callee: Rc<Sequence>,
use_output: bool,
flavor: StackFrameFlavor
) -> RuntimeResult<()>
[src]
&mut self,
callee: Rc<Sequence>,
use_output: bool,
flavor: StackFrameFlavor
) -> RuntimeResult<()>
pub fn interrupt_repeater(
&mut self,
break_val: Option<RantValue>,
should_continue: bool
) -> RuntimeResult<()>
[src]
&mut self,
break_val: Option<RantValue>,
should_continue: bool
) -> RuntimeResult<()>
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]
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>,