Struct snapshot_lib::SnapshotInfo
source · pub struct SnapshotInfo {
pub contributions: Vec<KeyContribution>,
pub hir: VoterHIR,
}
Fields§
§contributions: Vec<KeyContribution>
The values in the contributions are the original values in the registration transactions and thus retain the original proportions. However, it’s possible that the sum of those values is greater than the voting power assigned in the VoterHIR, due to voting power caps or additional transformations.
hir: VoterHIR
Implementations§
source§impl SnapshotInfo
impl SnapshotInfo
pub fn as_loadtest_snapshot(&self) -> Self
pub fn cap_voting_power(&self, cap: u64) -> Self
Trait Implementations§
source§impl Clone for SnapshotInfo
impl Clone for SnapshotInfo
source§fn clone(&self) -> SnapshotInfo
fn clone(&self) -> SnapshotInfo
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 Debug for SnapshotInfo
impl Debug for SnapshotInfo
source§impl<'de> Deserialize<'de> for SnapshotInfo
impl<'de> Deserialize<'de> for SnapshotInfo
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
Auto Trait Implementations§
impl RefUnwindSafe for SnapshotInfo
impl Send for SnapshotInfo
impl Sync for SnapshotInfo
impl Unpin for SnapshotInfo
impl UnwindSafe for SnapshotInfo
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