pub struct Vm<'a, T: PrimitiveSet> { /* private fields */ }Implementations§
source§impl<'a, T: PrimitiveSet> Vm<'a, T>
impl<'a, T: PrimitiveSet> Vm<'a, T>
pub fn new(heap: &'a mut [Value], primitive_set: T) -> Result<Self, T::Error>
pub fn run(&mut self) -> Result<(), T::Error>
pub fn stack(&self) -> Cons
pub fn push(&mut self, value: Value) -> Result<(), T::Error>
pub fn pop(&mut self) -> Result<Value, T::Error>
pub fn top(&self) -> Value
pub fn set_top(&mut self, value: Value)
pub fn allocate(&mut self, car: Value, cdr: Value) -> Result<Cons, T::Error>
pub fn car(&self, cons: Cons) -> Value
pub fn cdr(&self, cons: Cons) -> Value
pub fn car_value(&self, cons: Value) -> Value
pub fn cdr_value(&self, cons: Value) -> Value
pub fn set_car(&mut self, cons: Cons, value: Value)
pub fn set_cdr(&mut self, cons: Cons, value: Value)
pub fn set_car_value(&mut self, cons: Value, value: Value)
pub fn set_cdr_value(&mut self, cons: Value, value: Value)
pub fn boolean(&self, value: bool) -> Cons
pub fn null(&self) -> Cons
pub fn initialize( &mut self, input: impl IntoIterator<Item = u8> ) -> Result<(), T::Error>
pub fn primitive_set(&self) -> &T
pub fn primitive_set_mut(&mut self) -> &mut T
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for Vm<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Vm<'a, T>where
T: Send,
impl<'a, T> Sync for Vm<'a, T>where
T: Sync,
impl<'a, T> Unpin for Vm<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for Vm<'a, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more