Struct snarkvm_debug::prelude::Ratifications
pub struct Ratifications<N>where
N: Network,{ /* private fields */ }Implementations§
§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
pub fn to_ratifications_root(&self) -> Result<Field<N>, Error>
pub fn to_ratifications_root(&self) -> Result<Field<N>, Error>
Returns the ratifications root, by computing the root for a Merkle tree of the ratification IDs.
pub fn to_path(
&self,
ratification_id: <N as Network>::RatificationID
) -> Result<MerklePath<N, snarkvm_console_program::::state_path::configuration::RatificationsPath::{constant#0}>, Error>
pub fn to_path( &self, ratification_id: <N as Network>::RatificationID ) -> Result<MerklePath<N, snarkvm_console_program::::state_path::configuration::RatificationsPath::{constant#0}>, Error>
Returns the Merkle path for the ratifications leaf.
§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
pub fn try_from_iter<T>(iter: T) -> Result<Ratifications<N>, Error>where
T: IntoIterator<Item = Ratify<N>>,
pub fn try_from_iter<T>(iter: T) -> Result<Ratifications<N>, Error>where
T: IntoIterator<Item = Ratify<N>>,
Initializes from an iterator of ratifications.
§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
pub fn contains(&self, ratification_id: &<N as Network>::RatificationID) -> bool
pub fn contains(&self, ratification_id: &<N as Network>::RatificationID) -> bool
Returns true if the ratifications contains the given commitment.
pub fn get(
&self,
ratification_id: &<N as Network>::RatificationID
) -> Option<&Ratify<N>>
pub fn get( &self, ratification_id: &<N as Network>::RatificationID ) -> Option<&Ratify<N>>
Returns the ratification for the given ratification ID.
§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
pub const MAX_RATIFICATIONS: usize = 65_536usize
pub const MAX_RATIFICATIONS: usize = 65_536usize
The maximum number of ratifications allowed in a block.
pub fn iter(&self) -> impl ExactSizeIterator
pub fn iter(&self) -> impl ExactSizeIterator
Returns an iterator over all ratifications, for all ratifications in self.
pub fn par_iter(&self) -> impl ParallelIterator<Item = &Ratify<N>>
pub fn par_iter(&self) -> impl ParallelIterator<Item = &Ratify<N>>
Returns a parallel iterator over all ratifications, for all ratifications in self.
pub fn ratification_ids(&self) -> impl ExactSizeIterator
pub fn ratification_ids(&self) -> impl ExactSizeIterator
Returns an iterator over the ratification IDs, for all ratifications in self.
§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
pub fn into_ratification_ids(self) -> impl ExactSizeIterator
pub fn into_ratification_ids(self) -> impl ExactSizeIterator
Returns a consuming iterator over the ratification IDs, for all ratifications in self.
Trait Implementations§
§impl<N> Clone for Ratifications<N>
impl<N> Clone for Ratifications<N>
§fn clone(&self) -> Ratifications<N>
fn clone(&self) -> Ratifications<N>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<N> Debug for Ratifications<N>where
N: Network,
impl<N> Debug for Ratifications<N>where
N: Network,
§impl<'de, N> Deserialize<'de> for Ratifications<N>where
N: Network,
impl<'de, N> Deserialize<'de> for Ratifications<N>where
N: Network,
§fn deserialize<D>(
deserializer: D
) -> Result<Ratifications<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Ratifications<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserializes the ratifications from a JSON-string or buffer.
§impl<N> Display for Ratifications<N>where
N: Network,
impl<N> Display for Ratifications<N>where
N: Network,
§impl<N> FromBytes for Ratifications<N>where
N: Network,
impl<N> FromBytes for Ratifications<N>where
N: Network,
§impl<N> FromStr for Ratifications<N>where
N: Network,
impl<N> FromStr for Ratifications<N>where
N: Network,
§impl<N> IntoIterator for Ratifications<N>where
N: Network,
impl<N> IntoIterator for Ratifications<N>where
N: Network,
§fn into_iter(self) -> <Ratifications<N> as IntoIterator>::IntoIter
fn into_iter(self) -> <Ratifications<N> as IntoIterator>::IntoIter
Returns a consuming iterator over all ratifications, for all ratifications in self.
§type IntoIter = IntoValues<<N as Network>::RatificationID, <Ratifications<N> as IntoIterator>::Item>
type IntoIter = IntoValues<<N as Network>::RatificationID, <Ratifications<N> as IntoIterator>::Item>
§impl<N> PartialEq for Ratifications<N>
impl<N> PartialEq for Ratifications<N>
§fn eq(&self, other: &Ratifications<N>) -> bool
fn eq(&self, other: &Ratifications<N>) -> bool
self and other values to be equal, and is used
by ==.§impl<N> Serialize for Ratifications<N>where
N: Network,
impl<N> Serialize for Ratifications<N>where
N: Network,
§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serializes the ratifications to a JSON-string or buffer.
§impl<N> ToBytes for Ratifications<N>where
N: Network,
impl<N> ToBytes for Ratifications<N>where
N: Network,
§impl<N> TryFrom<&[Ratify<N>]> for Ratifications<N>where
N: Network,
impl<N> TryFrom<&[Ratify<N>]> for Ratifications<N>where
N: Network,
impl<N> Eq for Ratifications<N>
impl<N> StructuralEq for Ratifications<N>where
N: Network,
impl<N> StructuralPartialEq for Ratifications<N>where
N: Network,
Auto Trait Implementations§
impl<N> RefUnwindSafe for Ratifications<N>
impl<N> Send for Ratifications<N>
impl<N> Sync for Ratifications<N>
impl<N> Unpin for Ratifications<N>
impl<N> UnwindSafe for Ratifications<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<'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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.