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§fn read_le<R>(reader: R) -> Result<Ratifications<N>, Error>where
R: Read,
fn read_le<R>(reader: R) -> Result<Ratifications<N>, Error>where
R: Read,
Reads the ratifications from buffer.
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> 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§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.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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.