Struct gauge::EpochGauge
source · [−]Expand description
An EpochGauge is a Gauge’s total committed votes for a given epoch.
Seeds:
[
b"EpochGauge".as_ref(),
gauge.key().as_ref(),
voting_epoch.to_le_bytes().as_ref()
],
Fields
gauge: Pubkey
The Gauge.
voting_epoch: u32
The epoch associated with this EpochGauge.
total_power: u64
The total number of power to be applied to the latest voted epoch. If this number is non-zero, vote weights cannot be changed until they are all withdrawn.
Trait Implementations
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a Mint
account into a token
Account
. Read more
impl BorshDeserialize for EpochGauge where
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
impl BorshDeserialize for EpochGauge where
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
impl BorshSerialize for EpochGauge where
Pubkey: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
impl BorshSerialize for EpochGauge where
Pubkey: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for EpochGauge
impl Send for EpochGauge
impl Sync for EpochGauge
impl Unpin for EpochGauge
impl UnwindSafe for EpochGauge
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more