Struct gauge::EpochGaugeVoter
source · [−]pub struct EpochGaugeVoter {
pub gauge_voter: Pubkey,
pub voting_epoch: u32,
pub weight_change_seqno: u64,
pub voting_power: u64,
pub allocated_power: u64,
}
Expand description
An EpochGaugeVoter is a GaugeVoter’s total committed votes for a given Gauge at a given epoch.
Fields
gauge_voter: Pubkey
The GaugeVoter.
voting_epoch: u32
The epoch that the GaugeVoter is voting for.
weight_change_seqno: u64
The GaugeVoter::weight_change_seqno at the time of creating the EpochGaugeVoter. If this number is not equal to the GaugeVoter::weight_change_seqno, this commitment is stale and must be reset before applying any new votes for this epoch.
voting_power: u64
The total amount of voting power.
allocated_power: u64
The total amount of gauge voting power that has been allocated. If this number is non-zero, vote weights cannot be changed until they are all withdrawn.
Implementations
sourceimpl EpochGaugeVoter
impl EpochGaugeVoter
sourcepub const LEN: usize = 60usize
pub const LEN: usize = 60usize
Length of an EpochGaugeVoter in bytes.
Trait Implementations
sourceimpl AccountDeserialize for EpochGaugeVoter
impl AccountDeserialize for EpochGaugeVoter
sourcefn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
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
sourceimpl AccountSerialize for EpochGaugeVoter
impl AccountSerialize for EpochGaugeVoter
sourceimpl BorshDeserialize for EpochGaugeVoter where
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
impl BorshDeserialize for EpochGaugeVoter where
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
u64: BorshDeserialize,
sourceimpl BorshSerialize for EpochGaugeVoter where
Pubkey: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
impl BorshSerialize for EpochGaugeVoter where
Pubkey: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
u64: BorshSerialize,
sourceimpl Clone for EpochGaugeVoter
impl Clone for EpochGaugeVoter
sourcefn clone(&self) -> EpochGaugeVoter
fn clone(&self) -> EpochGaugeVoter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EpochGaugeVoter
impl Debug for EpochGaugeVoter
sourceimpl Default for EpochGaugeVoter
impl Default for EpochGaugeVoter
sourcefn default() -> EpochGaugeVoter
fn default() -> EpochGaugeVoter
Returns the “default value” for a type. Read more
sourceimpl Discriminator for EpochGaugeVoter
impl Discriminator for EpochGaugeVoter
fn discriminator() -> [u8; 8]
sourceimpl Owner for EpochGaugeVoter
impl Owner for EpochGaugeVoter
impl Copy for EpochGaugeVoter
Auto Trait Implementations
impl RefUnwindSafe for EpochGaugeVoter
impl Send for EpochGaugeVoter
impl Sync for EpochGaugeVoter
impl Unpin for EpochGaugeVoter
impl UnwindSafe for EpochGaugeVoter
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more