pub enum StateMemory {
AllocSlots,
Load,
Store,
Truncate,
Length,
ValueLen,
}Expand description
Operations for controlling mutable state slots.
Variants§
AllocSlots
Load
0x81: LODS
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: STOS
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 copy of the value. Read more
1.6.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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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