pub struct State { /* private fields */ }
Implementations
sourceimpl State
impl State
pub fn get_program(&self) -> &Program
pub fn call_function_by_index(
&mut self,
function_index: usize,
parameters: &[Object]
) -> Result<(), RuntimeError>
pub fn current_frame_as_mut(&mut self) -> &mut Frame
pub fn current_frame(&self) -> &Frame
pub fn pop(&mut self) -> Option<Object>
pub fn push(&mut self, object: Object)
pub fn top(&self) -> Object
pub fn last_position(&self) -> Position
pub fn execute_by_function_index(
&mut self,
function_index: usize,
parameters: &[Object]
) -> Result<Object, RuntimeError>
pub fn execute(&mut self) -> Result<Object, RuntimeError>
pub fn add_native_function(
&mut self,
name: &str,
function: fn(_: &mut State, _: &[Object]) -> Result<Object, RuntimeError>
)
pub fn add_native_model(
&mut self,
name: &str,
native_model: Reference<dyn NativeModel>
) -> usize
pub fn step(&mut self) -> Result<(), RuntimeError>
sourceimpl State
impl State
pub fn binary_operation_with_parameters(
self: &mut State,
left: &Object,
right: &Object,
operand: usize
) -> Result<(), RuntimeError>
pub fn negative_operation(&self, target: &Object) -> Result<Object, RuntimeError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more