pub enum StateRead {
KeyRange,
KeyRangeExtern,
PostKeyRange,
PostKeyRangeExtern,
}
Expand description
Operations related to reading state.
Variants§
KeyRange
0x80
: KRNG
Read a range of values at each key from state starting at the key into memory starting at the given memory address.
The key is lexographically incremented for each value read. All keys are assumed to be the same length.
An [index, len] pair is written into memory for each value, followed by
the values themselves. E.g. when reading values a and b, they will
be laid out in memory from the given mem_addr
as follows:
[a_addr, a_len, b_addr, b_len, a_value, b_value]
§Stack Input
[key_w0, ...key_wN, key_len, num_keys_to_read, mem_addr]
KeyRangeExtern
0x81
: KREX
Read a range of values at each key from external state starting at the key into memory starting at the given memory address.
The key is lexographically incremented for each value read. All keys are assumed to be the same length.
The external state is at the ext
address.
An [index, len] pair is written into memory for each value, followed by
the values themselves. E.g. when reading values a and b, they will
be laid out in memory from the given mem_addr
as follows:
[a_addr, a_len, b_addr, b_len, a_value, b_value]
§Stack Input
[ext_w0, ext_w1, ext_w2, ext_w3, key_w0, ...key_wN, key_len, num_keys_to_read, mem_addr]
PostKeyRange
0x82
: PKRNG
Read a range of values at each key from post state starting at the key into memory starting at the given memory address.
The key is lexographically incremented for each value read. All keys are assumed to be the same length.
An [index, len] pair is written into memory for each value, followed by
the values themselves. E.g. when reading values a and b, they will
be laid out in memory from the given mem_addr
as follows:
[a_addr, a_len, b_addr, b_len, a_value, b_value]
§Stack Input
[key_w0, ...key_wN, key_len, num_keys_to_read, mem_addr]
PostKeyRangeExtern
0x83
: PKREX
Read a range of values at each key from external post state starting at the key into memory starting at the given memory address.
The key is lexographically incremented for each value read. All keys are assumed to be the same length.
The external state is at the ext
address.
An [index, len] pair is written into memory for each value, followed by
the values themselves. E.g. when reading values a and b, they will
be laid out in memory from the given mem_addr
as follows:
[a_addr, a_len, b_addr, b_len, a_value, b_value]
§Stack Input
[ext_w0, ext_w1, ext_w2, ext_w3, key_w0, ...key_wN, key_len, num_keys_to_read, mem_addr]
Trait Implementations§
Source§impl Ord for StateRead
impl Ord for StateRead
Source§impl PartialOrd for StateRead
impl PartialOrd for StateRead
Source§impl TryFromBytes for StateRead
impl TryFromBytes for StateRead
Source§type Error = FromBytesError
type Error = FromBytesError
impl Copy for StateRead
impl Eq for StateRead
impl StructuralPartialEq for StateRead
Auto Trait Implementations§
impl Freeze for StateRead
impl RefUnwindSafe for StateRead
impl Send for StateRead
impl Sync for StateRead
impl Unpin for StateRead
impl UnwindSafe for StateRead
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
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>
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>
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