Struct snarkvm_ledger_block::ratifications::Ratifications
source · pub struct Ratifications<N: Network> { /* private fields */ }
Implementations§
source§impl<N: Network> Ratifications<N>
impl<N: Network> Ratifications<N>
sourcepub fn to_ratifications_root(&self) -> Result<Field<N>>
pub fn to_ratifications_root(&self) -> Result<Field<N>>
Returns the ratifications root, by computing the root for a Merkle tree of the ratification IDs.
source§impl<N: Network> Ratifications<N>
impl<N: Network> Ratifications<N>
sourcepub fn try_from_iter<T: IntoIterator<Item = Ratify<N>>>(iter: T) -> Result<Self>
pub fn try_from_iter<T: IntoIterator<Item = Ratify<N>>>(iter: T) -> Result<Self>
Initializes from an iterator of ratifications.
source§impl<N: Network> Ratifications<N>
impl<N: Network> Ratifications<N>
source§impl<N: Network> Ratifications<N>
impl<N: Network> Ratifications<N>
sourcepub const MAX_RATIFICATIONS: usize = 65_536usize
pub const MAX_RATIFICATIONS: usize = 65_536usize
The maximum number of ratifications allowed in a block.
sourcepub fn iter(&self) -> impl '_ + ExactSizeIterator<Item = &Ratify<N>>
pub fn iter(&self) -> impl '_ + ExactSizeIterator<Item = &Ratify<N>>
Returns an iterator over all ratifications, for all ratifications in self
.
sourcepub 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
.
sourcepub fn ratification_ids(
&self
) -> impl '_ + ExactSizeIterator<Item = &N::RatificationID>
pub fn ratification_ids( &self ) -> impl '_ + ExactSizeIterator<Item = &N::RatificationID>
Returns an iterator over the ratification IDs, for all ratifications in self
.
source§impl<N: Network> Ratifications<N>
impl<N: Network> Ratifications<N>
sourcepub fn into_ratification_ids(
self
) -> impl ExactSizeIterator<Item = N::RatificationID>
pub fn into_ratification_ids( self ) -> impl ExactSizeIterator<Item = N::RatificationID>
Returns a consuming iterator over the ratification IDs, for all ratifications in self
.
Trait Implementations§
source§impl<N: Clone + Network> Clone for Ratifications<N>where
N::RatificationID: Clone,
impl<N: Clone + Network> Clone for Ratifications<N>where N::RatificationID: Clone,
source§fn clone(&self) -> Ratifications<N>
fn clone(&self) -> Ratifications<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<N: Network> Debug for Ratifications<N>
impl<N: Network> Debug for Ratifications<N>
source§impl<'de, N: Network> Deserialize<'de> for Ratifications<N>
impl<'de, N: Network> Deserialize<'de> for Ratifications<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 ratifications from a JSON-string or buffer.
source§impl<N: Network> Display for Ratifications<N>
impl<N: Network> Display for Ratifications<N>
source§impl<N: Network> FromBytes for Ratifications<N>
impl<N: Network> FromBytes for Ratifications<N>
source§impl<N: Network> FromStr for Ratifications<N>
impl<N: Network> FromStr for Ratifications<N>
source§impl<N: Network> IntoIterator for Ratifications<N>
impl<N: Network> IntoIterator for Ratifications<N>
source§fn into_iter(self) -> Self::IntoIter
fn into_iter(self) -> Self::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>
Which kind of iterator are we turning this into?
source§impl<N: PartialEq + Network> PartialEq for Ratifications<N>where
N::RatificationID: PartialEq,
impl<N: PartialEq + Network> PartialEq for Ratifications<N>where N::RatificationID: PartialEq,
source§fn eq(&self, other: &Ratifications<N>) -> bool
fn eq(&self, other: &Ratifications<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<N: Network> Serialize for Ratifications<N>
impl<N: Network> Serialize for Ratifications<N>
source§impl<N: Network> ToBytes for Ratifications<N>
impl<N: Network> ToBytes for Ratifications<N>
source§impl<N: Network> TryFrom<&[Ratify<N>]> for Ratifications<N>
impl<N: Network> TryFrom<&[Ratify<N>]> for Ratifications<N>
impl<N: Eq + Network> Eq for Ratifications<N>where N::RatificationID: Eq,
impl<N: Network> StructuralEq for Ratifications<N>
impl<N: Network> StructuralPartialEq for Ratifications<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for Ratifications<N>where <N as Environment>::Projective: RefUnwindSafe, <N as Network>::RatificationID: RefUnwindSafe,
impl<N> Send for Ratifications<N>
impl<N> Sync for Ratifications<N>
impl<N> Unpin for Ratifications<N>where <N as Environment>::Projective: Unpin, <N as Network>::RatificationID: Unpin,
impl<N> UnwindSafe for Ratifications<N>where <N as Environment>::Projective: UnwindSafe, <N as Network>::RatificationID: 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
Mutably borrows from an owned value. Read more
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key
and return true
if they are equal.