pub struct ClosedRegistrationEntry { /* private fields */ }Expand description
Represents a registration entry of a closed key registration.
Implementations§
Source§impl ClosedRegistrationEntry
impl ClosedRegistrationEntry
Sourcepub fn new(
verification_key_for_concatenation: VerificationKeyForConcatenation,
stake: Stake,
) -> Self
pub fn new( verification_key_for_concatenation: VerificationKeyForConcatenation, stake: Stake, ) -> Self
Creates a new closed registration entry.
Sourcepub fn get_verification_key_for_concatenation(
&self,
) -> VerificationKeyForConcatenation
pub fn get_verification_key_for_concatenation( &self, ) -> VerificationKeyForConcatenation
Gets the verification key for concatenation.
Trait Implementations§
Source§impl Clone for ClosedRegistrationEntry
impl Clone for ClosedRegistrationEntry
Source§fn clone(&self) -> ClosedRegistrationEntry
fn clone(&self) -> ClosedRegistrationEntry
Returns a duplicate 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 Debug for ClosedRegistrationEntry
impl Debug for ClosedRegistrationEntry
Source§impl<'de> Deserialize<'de> for ClosedRegistrationEntry
impl<'de> Deserialize<'de> for ClosedRegistrationEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ClosedRegistrationEntry> for Option<RegistrationEntryForConcatenation>
impl From<ClosedRegistrationEntry> for Option<RegistrationEntryForConcatenation>
Source§fn from(
entry: ClosedRegistrationEntry,
) -> Option<RegistrationEntryForConcatenation>
fn from( entry: ClosedRegistrationEntry, ) -> Option<RegistrationEntryForConcatenation>
Converts to this type from the input type.
Source§impl From<ClosedRegistrationEntry> for RegistrationEntry
impl From<ClosedRegistrationEntry> for RegistrationEntry
Source§fn from(entry: ClosedRegistrationEntry) -> Self
fn from(entry: ClosedRegistrationEntry) -> Self
Converts to this type from the input type.
Source§impl Hash for ClosedRegistrationEntry
impl Hash for ClosedRegistrationEntry
Source§impl Ord for ClosedRegistrationEntry
impl Ord for ClosedRegistrationEntry
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Orders by stake first, then by Verification key for concatenation.
Note: this ordering intentionally excludes the snark fields
(VerificationKeyForSnark, LotteryTargetValue), as we do not need them for ordering
the Merkle tree leaves.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ClosedRegistrationEntry
impl PartialEq for ClosedRegistrationEntry
Source§impl PartialOrd for ClosedRegistrationEntry
impl PartialOrd for ClosedRegistrationEntry
Source§impl Serialize for ClosedRegistrationEntry
impl Serialize for ClosedRegistrationEntry
Source§impl TryFrom<(RegistrationEntry, u64, f64)> for ClosedRegistrationEntry
Converts a RegistrationEntry into a ClosedRegistrationEntry.
impl TryFrom<(RegistrationEntry, u64, f64)> for ClosedRegistrationEntry
Converts a RegistrationEntry into a ClosedRegistrationEntry.
Extracts the concatenation verification key and stake from the entry. When the future_snark
feature is enabled and a SNARK verification key is present, the lottery target value is also
computed from phi_f, the entry’s stake, and total_stake via compute_target_value_for_snark_lottery.
impl Eq for ClosedRegistrationEntry
impl StructuralPartialEq for ClosedRegistrationEntry
Auto Trait Implementations§
impl Freeze for ClosedRegistrationEntry
impl RefUnwindSafe for ClosedRegistrationEntry
impl Send for ClosedRegistrationEntry
impl Sync for ClosedRegistrationEntry
impl Unpin for ClosedRegistrationEntry
impl UnsafeUnpin for ClosedRegistrationEntry
impl UnwindSafe for ClosedRegistrationEntry
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