[][src]Struct casper_types::auction::Bid

pub struct Bid {
    pub bonding_purse: URef,
    pub staked_amount: U512,
    pub delegation_rate: DelegationRate,
    pub funds_locked: Option<EraId>,
}

An entry in a founding validator map.

Fields

bonding_purse: URef

The purse that was used for bonding.

staked_amount: U512

The total amount of staked tokens.

delegation_rate: DelegationRate

Delegation rate

funds_locked: Option<EraId>

A flag that represents a winning entry.

Some indicates locked funds for a specific era and an autowin status, and None case means that funds are unlocked and autowin status is removed.

Implementations

impl Bid[src]

pub fn new_locked(
    bonding_purse: URef,
    staked_amount: U512,
    funds_locked: EraId
) -> Self
[src]

Creates new instance of a bid with locked funds.

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

Checks if a given founding validator can release its funds.

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

Checks if a given founding validator can withdraw its funds.

Trait Implementations

impl CLTyped for Bid[src]

impl Debug for Bid[src]

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

impl<'_> From<&'_ Bid> for SeigniorageRecipient[src]

impl FromBytes for Bid[src]

impl PartialEq<Bid> for Bid[src]

impl Serialize for Bid[src]

impl StructuralPartialEq for Bid[src]

impl ToBytes for Bid[src]

Auto Trait Implementations

impl RefUnwindSafe for Bid

impl Send for Bid

impl Sync for Bid

impl Unpin for Bid

impl UnwindSafe for Bid

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, 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.