[−][src]Struct kaiju_vm_core::state::State
Methods
impl State[src]
pub fn new(stack_size: usize, memory_size: usize) -> Self[src]
pub fn stack_size(&self) -> usize[src]
pub fn memory_size(&self) -> usize[src]
pub fn all_size(&self) -> usize[src]
pub fn stack_pos(&self) -> usize[src]
pub fn stack_free(&self) -> usize[src]
pub fn memory_free(&self) -> usize[src]
pub fn all_free(&self) -> usize[src]
pub fn stack_push_data<T>(&mut self, value: &T) -> SimpleResult<Value>[src]
pub fn stack_push_bytes(&mut self, source: &[u8]) -> SimpleResult<Value>[src]
pub fn stack_push_move(
&mut self,
source: usize,
size: usize
) -> SimpleResult<Value>[src]
&mut self,
source: usize,
size: usize
) -> SimpleResult<Value>
pub fn stack_pop_bytes(&mut self, size: usize) -> SimpleResult<Vec<u8>>[src]
pub fn stack_pop_data<T: Default>(&mut self) -> SimpleResult<T>[src]
pub fn stack_pop_move(
&mut self,
destination: usize,
size: usize
) -> SimpleResult<()>[src]
&mut self,
destination: usize,
size: usize
) -> SimpleResult<()>
pub fn stack_reset(&mut self, position: usize) -> SimpleResult<()>[src]
pub fn memory_move(
&mut self,
source: usize,
size: usize,
destination: usize
) -> SimpleResult<()>[src]
&mut self,
source: usize,
size: usize,
destination: usize
) -> SimpleResult<()>
pub fn store_data<T>(
&mut self,
destination: usize,
value: &T
) -> SimpleResult<()>[src]
&mut self,
destination: usize,
value: &T
) -> SimpleResult<()>
pub fn store_bytes(
&mut self,
destination: usize,
value: &[u8]
) -> SimpleResult<()>[src]
&mut self,
destination: usize,
value: &[u8]
) -> SimpleResult<()>
pub fn load_data<T: Default>(&self, source: usize) -> SimpleResult<T>[src]
pub fn load_bytes(&self, source: usize, size: usize) -> SimpleResult<Vec<u8>>[src]
pub fn load_bytes_while<P>(&self, source: usize, predicate: P) -> Vec<u8> where
P: FnMut(u8) -> bool, [src]
P: FnMut(u8) -> bool,
pub fn load_bytes_while_non_zero(&self, source: usize) -> Vec<u8>[src]
pub fn map(&self, value: Value) -> SimpleResult<&[u8]>[src]
pub fn map_mut(&mut self, value: Value) -> SimpleResult<&mut [u8]>[src]
pub fn map_stack(&self) -> &[u8][src]
pub fn map_stack_mut(&mut self) -> &mut [u8][src]
pub fn map_memory(&self) -> &[u8][src]
pub fn map_memory_mut(&mut self) -> &mut [u8][src]
pub fn map_all(&self) -> &[u8][src]
pub fn map_all_mut(&mut self) -> &mut [u8][src]
pub fn alloc_stack_value(&mut self, size: usize) -> SimpleResult<Value>[src]
pub fn alloc_memory_value(&mut self, size: usize) -> SimpleResult<Value>[src]
pub fn dealloc_memory_value(&mut self, value: &Value) -> SimpleResult<()>[src]
Trait Implementations
Auto Trait Implementations
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
impl RefUnwindSafe for State
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
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<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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,