pub enum FinalizeOperation<N: Network> {
InitializeMapping(Field<N>),
InsertKeyValue(Field<N>, Field<N>, Field<N>),
UpdateKeyValue(Field<N>, Field<N>, Field<N>),
RemoveKeyValue(Field<N>, Field<N>),
ReplaceMapping(Field<N>),
RemoveMapping(Field<N>),
}Expand description
Enum to represent the allowed set of Merkle tree operations.
Variants§
InitializeMapping(Field<N>)
Appends a mapping to the program tree, as (mapping ID).
InsertKeyValue(Field<N>, Field<N>, Field<N>)
Inserts a key-value leaf into the mapping tree,
as (mapping ID, key ID, value ID).
UpdateKeyValue(Field<N>, Field<N>, Field<N>)
Updates the key-value leaf in the mapping tree,
as (mapping ID, key ID, value ID).
RemoveKeyValue(Field<N>, Field<N>)
Removes the key-value leaf in the mapping tree,
as (mapping ID, key ID).
ReplaceMapping(Field<N>)
Replaces a mapping from the program tree, as (mapping ID).
RemoveMapping(Field<N>)
Removes a mapping from the program tree, as (mapping ID).
Trait Implementations§
Source§impl<N: Clone + Network> Clone for FinalizeOperation<N>
impl<N: Clone + Network> Clone for FinalizeOperation<N>
Source§fn clone(&self) -> FinalizeOperation<N>
fn clone(&self) -> FinalizeOperation<N>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<N: Network> Debug for FinalizeOperation<N>
impl<N: Network> Debug for FinalizeOperation<N>
Source§impl<'de, N: Network> Deserialize<'de> for FinalizeOperation<N>
impl<'de, N: Network> Deserialize<'de> for FinalizeOperation<N>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the finalize operations from a JSON-string or buffer.
Source§impl<N: Network> Display for FinalizeOperation<N>
impl<N: Network> Display for FinalizeOperation<N>
Source§impl<N: Network> FromBits for FinalizeOperation<N>
impl<N: Network> FromBits for FinalizeOperation<N>
Source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self from a boolean array in little-endian order.
Source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self from a boolean array in big-endian order.
Source§impl<N: Network> FromBytes for FinalizeOperation<N>
impl<N: Network> FromBytes for FinalizeOperation<N>
Source§fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Self from a byte array in little-endian order.Source§fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Self::from_bytes_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
Self::read_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§impl<N: Network> FromStr for FinalizeOperation<N>
impl<N: Network> FromStr for FinalizeOperation<N>
Source§impl<N: Network> Serialize for FinalizeOperation<N>
impl<N: Network> Serialize for FinalizeOperation<N>
Source§impl<N: Network> ToBits for FinalizeOperation<N>
impl<N: Network> ToBits for FinalizeOperation<N>
Source§fn write_bits_le(&self, vec: &mut Vec<bool>)
fn write_bits_le(&self, vec: &mut Vec<bool>)
Returns the little-endian bits of the finalize operation.
Source§fn write_bits_be(&self, vec: &mut Vec<bool>)
fn write_bits_be(&self, vec: &mut Vec<bool>)
Returns the big-endian bits of the finalize operation.
Source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
self as a boolean array in little-endian order.Source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
self as a boolean array in big-endian order.Source§impl<N: Network> ToBytes for FinalizeOperation<N>
impl<N: Network> ToBytes for FinalizeOperation<N>
impl<N: Copy + Network> Copy for FinalizeOperation<N>
impl<N: Eq + Network> Eq for FinalizeOperation<N>
impl<N: Network> StructuralPartialEq for FinalizeOperation<N>
Auto Trait Implementations§
impl<N> Freeze for FinalizeOperation<N>
impl<N> RefUnwindSafe for FinalizeOperation<N>
impl<N> Send for FinalizeOperation<N>
impl<N> Sync for FinalizeOperation<N>
impl<N> Unpin for FinalizeOperation<N>
impl<N> UnwindSafe for FinalizeOperation<N>
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<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
fn take_from_value<D>(
value: &mut Value,
field: &str,
) -> Result<T, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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