pub enum FinalizeOperation<N: Network> {
InitializeMapping(Field<N>),
InsertKeyValue(Field<N>, Field<N>, Field<N>),
UpdateKeyValue(Field<N>, u64, Field<N>, Field<N>),
RemoveKeyValue(Field<N>, u64),
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>, u64, Field<N>, Field<N>)
Updates the key-value leaf at the given index in the mapping tree,
as (mapping ID
, index
, key ID
, value ID
).
RemoveKeyValue(Field<N>, u64)
Removes the key-value leaf at the given index in the mapping tree,
as (mapping ID
, index
).
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§impl<N: Network> FromStr for FinalizeOperation<N>
impl<N: Network> FromStr for FinalizeOperation<N>
source§impl<N: PartialEq + Network> PartialEq for FinalizeOperation<N>
impl<N: PartialEq + Network> PartialEq for FinalizeOperation<N>
source§fn eq(&self, other: &FinalizeOperation<N>) -> bool
fn eq(&self, other: &FinalizeOperation<N>) -> bool
self
and other
values to be equal, and is used
by ==
.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.
§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
self
as a boolean array in little-endian order.§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> StructuralEq for FinalizeOperation<N>
impl<N: Network> StructuralPartialEq for FinalizeOperation<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for FinalizeOperation<N>where <N as Environment>::Field: RefUnwindSafe,
impl<N> Send for FinalizeOperation<N>
impl<N> Sync for FinalizeOperation<N>
impl<N> Unpin for FinalizeOperation<N>where <N as Environment>::Field: Unpin,
impl<N> UnwindSafe for FinalizeOperation<N>where <N as Environment>::Field: UnwindSafe,
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
§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>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.