pub enum StateMemory {
    AllocSlots,
    Load,
    Store,
    Truncate,
    Length,
    ValueLen,
}Expand description
Operations for controlling mutable state slots.
Variants§
AllocSlots
Load
0x81: LODSM
Access a range of len words starting from value_ix within
the memory slot located at slot_ix.
Returns a list of words with length equal to the specified len.
§Stack Input
[slot_ix, value_ix, len]
§Stack Output
[word, ...]
The stack output length depends on the value of the len stack input word.
§Panics
- slot_ix is out of bounds.
 - The range 
value_ix..(value_ix + len)is out of range. 
Store
0x82: STOSM
Store len words of data at the slot_ix starting at value_ix.
§Stack Input
[slot_ix, value_ix, data, len]
§Panics
- slot_ix is out of bounds.
 - value_ix > ValueLen.
 - len is out of bounds.
 
Truncate
0x83: TRUNC
Truncate the memory slot located at slot_ix to len words.
§Stack Input
[slot_ix, len]
§Panics
- slot_ix is out of bounds.
 
Length
ValueLen
Trait Implementations§
Source§impl Clone for StateMemory
 
impl Clone for StateMemory
Source§fn clone(&self) -> StateMemory
 
fn clone(&self) -> StateMemory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for StateMemory
 
impl Debug for StateMemory
Source§impl From<StateMemory> for StateRead
 
impl From<StateMemory> for StateRead
Source§fn from(subgroup: StateMemory) -> StateRead
 
fn from(subgroup: StateMemory) -> StateRead
Converts to this type from the input type.
Source§impl Hash for StateMemory
 
impl Hash for StateMemory
Source§impl Ord for StateMemory
 
impl Ord for StateMemory
Source§fn cmp(&self, other: &StateMemory) -> Ordering
 
fn cmp(&self, other: &StateMemory) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for StateMemory
 
impl PartialEq for StateMemory
Source§impl PartialOrd for StateMemory
 
impl PartialOrd for StateMemory
Source§impl ToBytes for StateMemory
 
impl ToBytes for StateMemory
Source§type Bytes = StateMemory
 
type Bytes = StateMemory
The iterator yielding bytes.
Source§impl ToOpcode for StateMemory
 
impl ToOpcode for StateMemory
Source§type Opcode = StateMemory
 
type Opcode = StateMemory
The associated 
Opcode type.Source§impl TryFromBytes for StateMemory
 
impl TryFromBytes for StateMemory
Source§type Error = FromBytesError
 
type Error = FromBytesError
Represents any error that might occur while parsing an op from bytes.
Source§fn try_from_bytes(
    bytes: &mut impl Iterator<Item = u8>,
) -> Option<Result<StateMemory, <StateMemory as TryFromBytes>::Error>>
 
fn try_from_bytes( bytes: &mut impl Iterator<Item = u8>, ) -> Option<Result<StateMemory, <StateMemory as TryFromBytes>::Error>>
Parse a single operation from the given iterator yielding bytes. Read more
impl Copy for StateMemory
impl Eq for StateMemory
impl StructuralPartialEq for StateMemory
Auto Trait Implementations§
impl Freeze for StateMemory
impl RefUnwindSafe for StateMemory
impl Send for StateMemory
impl Sync for StateMemory
impl Unpin for StateMemory
impl UnwindSafe for StateMemory
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more