[][src]Struct solana_stake_program::stake_state::Delegation

pub struct Delegation {
    pub voter_pubkey: Pubkey,
    pub stake: u64,
    pub activation_epoch: Epoch,
    pub deactivation_epoch: Epoch,
    pub warmup_cooldown_rate: f64,
}

Fields

voter_pubkey: Pubkey

to whom the stake is delegated

stake: u64

activated stake amount, set at delegate() time

activation_epoch: Epoch

epoch at which this stake was activated, std::Epoch::MAX if is a bootstrap stake

deactivation_epoch: Epoch

epoch the stake was deactivated, std::Epoch::MAX if not deactivated

warmup_cooldown_rate: f64

how much stake we can activate per-epoch as a fraction of currently effective stake

Methods

impl Delegation[src]

pub fn new(
    voter_pubkey: &Pubkey,
    stake: u64,
    activation_epoch: Epoch,
    warmup_cooldown_rate: f64
) -> Self
[src]

pub fn is_bootstrap(&self) -> bool[src]

pub fn stake(&self, epoch: Epoch, history: Option<&StakeHistory>) -> u64[src]

Trait Implementations

impl Clone for Delegation[src]

impl Copy for Delegation[src]

impl Debug for Delegation[src]

impl Default for Delegation[src]

impl<'de> Deserialize<'de> for Delegation[src]

impl PartialEq<Delegation> for Delegation[src]

impl Serialize for Delegation[src]

impl StructuralPartialEq for Delegation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.