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) -> Self
fn from(subgroup: StateMemory) -> Self
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§impl ToOpcode for StateMemory
impl ToOpcode for StateMemory
Source§impl TryFromBytes for StateMemory
impl TryFromBytes for StateMemory
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