Struct snapshot_lib::Snapshot
source · pub struct Snapshot {
pub(crate) inner: BTreeMap<Identifier, SnapshotInfo>,
pub stake_threshold: Value,
pub voting_power_cap: u64,
pub total_registered_voters: u64,
pub total_registered_voting_power: u128,
pub total_eligible_voters: u64,
pub total_eligible_voting_power: u128,
}
Fields§
§inner: BTreeMap<Identifier, SnapshotInfo>
§stake_threshold: Value
§voting_power_cap: u64
§total_registered_voters: u64
§total_registered_voting_power: u128
§total_eligible_voters: u64
§total_eligible_voting_power: u128
Implementations§
source§impl Snapshot
impl Snapshot
pub fn to_block0_initials( &self, discrimination: Discrimination ) -> Vec<InitialUTxO>
source§impl Snapshot
impl Snapshot
pub fn from_raw_snapshot( raw_snapshot: RawSnapshot, stake_threshold: Value, cap: Fraction, voting_group_assigner: &impl VotingGroupAssigner, discrimination: Discrimination, loadtest: bool ) -> Result<Self, Error>
pub fn stake_threshold(&self) -> Value
pub fn to_voter_hir(&self) -> Vec<VoterHIR>
pub fn to_full_snapshot_info(&self) -> Vec<SnapshotInfo>
pub fn voting_keys(&self) -> impl Iterator<Item = &Identifier>
pub fn contributions_for_voting_key<I: Borrow<Identifier>>( &self, voting_public_key: I ) -> Vec<KeyContribution>
Trait Implementations§
source§impl Arbitrary for Snapshot
impl Arbitrary for Snapshot
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.source§fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
Auto Trait Implementations§
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnwindSafe for Snapshot
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