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

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

Implementations

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>,
    fix_stake_deactivate: bool
) -> u64
[src]

pub fn stake_activating_and_deactivating(
    &self,
    target_epoch: Epoch,
    history: Option<&StakeHistory>,
    fix_stake_deactivate: bool
) -> (u64, u64, 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

impl RefUnwindSafe for Delegation

impl Send for Delegation

impl Sync for Delegation

impl Unpin for Delegation

impl UnwindSafe for Delegation

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

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.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]