Struct snarkvm_ledger::Ratifications
source · pub struct Ratifications<N>where
N: Network,{ /* private fields */ }
Implementations§
source§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
sourcepub 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.
sourcepub 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.
source§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
sourcepub 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.
source§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
sourcepub 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.
source§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
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
pub fn iter(&self) -> impl ExactSizeIterator
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
pub fn ratification_ids(&self) -> impl ExactSizeIterator
Returns an iterator over the ratification IDs, for all ratifications in self
.
source§impl<N> Ratifications<N>where
N: Network,
impl<N> Ratifications<N>where
N: Network,
sourcepub 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§
source§impl<N> Clone for Ratifications<N>
impl<N> Clone for Ratifications<N>
source§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 moresource§impl<N> Debug for Ratifications<N>where
N: Network,
impl<N> Debug for Ratifications<N>where
N: Network,
source§impl<'de, N> Deserialize<'de> for Ratifications<N>where
N: Network,
impl<'de, N> Deserialize<'de> for Ratifications<N>where
N: Network,
source§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.
source§impl<N> Display for Ratifications<N>where
N: Network,
impl<N> Display for Ratifications<N>where
N: Network,
source§impl<N> FromBytes for Ratifications<N>where
N: Network,
impl<N> FromBytes for Ratifications<N>where
N: Network,
source§impl<N> FromStr for Ratifications<N>where
N: Network,
impl<N> FromStr for Ratifications<N>where
N: Network,
source§impl<N> IntoIterator for Ratifications<N>where
N: Network,
impl<N> IntoIterator for Ratifications<N>where
N: Network,
source§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
.
source§type IntoIter = IntoValues<<N as Network>::RatificationID, <Ratifications<N> as IntoIterator>::Item>
type IntoIter = IntoValues<<N as Network>::RatificationID, <Ratifications<N> as IntoIterator>::Item>
source§impl<N> PartialEq for Ratifications<N>
impl<N> PartialEq for Ratifications<N>
source§impl<N> Serialize for Ratifications<N>where
N: Network,
impl<N> Serialize for Ratifications<N>where
N: Network,
source§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.
source§impl<N> ToBytes for Ratifications<N>where
N: Network,
impl<N> ToBytes for Ratifications<N>where
N: Network,
impl<N> Eq for Ratifications<N>
impl<N> StructuralPartialEq for Ratifications<N>where
N: Network,
Auto Trait Implementations§
impl<N> Freeze for Ratifications<N>
impl<N> RefUnwindSafe for Ratifications<N>where
<N as Network>::RatificationID: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
impl<N> Send for Ratifications<N>
impl<N> Sync for Ratifications<N>
impl<N> Unpin for Ratifications<N>
impl<N> UnwindSafe for Ratifications<N>where
<N as Network>::RatificationID: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
<N as Environment>::Projective: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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