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

pub struct Delegator { /* fields omitted */ }

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

Implementations

impl Delegator[src]

pub fn new(
    staked_amount: U512,
    bonding_purse: URef,
    delegatee: PublicKey
) -> Self
[src]

Creates a new Delegator

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

Returns the staked amount

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

Returns the bonding purse

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

Returns the seigniorage reward

pub fn decrease_stake(&mut self, amount: U512) -> 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 increase_reward(&mut self, amount: U512) -> Result<U512, Error>[src]

Increases the seigniorage reward of the provided delegator

pub fn zero_reward(&mut self)[src]

Zeros the seigniorage reward of the provided delegator

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 Ord for Delegator[src]

impl PartialEq<Delegator> for Delegator[src]

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

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

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,