Struct casper_types::system::auction::Delegator[][src]

pub struct Delegator { /* fields omitted */ }

Represents a party delegating their stake to a validator (or “delegatee”)

Implementations

impl Delegator[src]

pub fn unlocked(
    delegator_public_key: PublicKey,
    staked_amount: U512,
    bonding_purse: URef,
    validator_public_key: PublicKey
) -> Self
[src]

Creates a new Delegator

pub fn locked(
    delegator_public_key: PublicKey,
    staked_amount: U512,
    bonding_purse: URef,
    validator_public_key: PublicKey,
    release_timestamp_millis: u64
) -> Self
[src]

Creates new instance of a Delegator with locked funds.

pub fn staked_amount(&self) -> &U512[src]

Returns the staked amount

pub fn staked_amount_mut(&mut self) -> &mut U512[src]

Returns the mutable staked amount

pub fn bonding_purse(&self) -> &URef[src]

Returns the bonding purse

pub fn validator_public_key(&self) -> &PublicKey[src]

Returns delegatee

pub fn decrease_stake(
    &mut self,
    amount: U512,
    era_end_timestamp_millis: u64
) -> Result<U512, Error>
[src]

Decreases the stake of the provided bid

pub fn increase_stake(&mut self, amount: U512) -> Result<U512, Error>[src]

Increases the stake of the provided bid

pub fn vesting_schedule(&self) -> Option<&VestingSchedule>[src]

Returns a reference to the vesting schedule of the provided delegator bid. None if a non-genesis validator.

pub fn vesting_schedule_mut(&mut self) -> Option<&mut VestingSchedule>[src]

Returns a mutable reference to the vesting schedule of the provided delegator bid. None if a non-genesis validator.

Trait Implementations

impl CLTyped for Delegator[src]

impl Clone for Delegator[src]

impl Copy for Delegator[src]

impl Debug for Delegator[src]

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

impl Eq for Delegator[src]

impl FromBytes for Delegator[src]

impl PartialEq<Delegator> for Delegator[src]

impl Serialize for Delegator[src]

impl StructuralEq for Delegator[src]

impl StructuralPartialEq for Delegator[src]

impl ToBytes for Delegator[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> Conv for T

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

impl<T> FmtForward for T

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

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

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<V, T> VZip<V> for T where
    V: MultiLane<T>,