[][src]Struct casperlabs_proof_of_stake::Queue

pub struct Queue(pub Vec<QueueEntry>);

A queue of bonding or unbonding requests, sorted by timestamp in ascending order.

Methods

impl Queue[src]

pub fn push(
    &mut self,
    validator: PublicKey,
    amount: U512,
    timestamp: BlockTime
) -> Result<()>
[src]

Pushes a new entry to the end of the queue.

Returns an error if the validator already has a request in the queue.

pub fn pop_due(&mut self, timestamp: BlockTime) -> Vec<QueueEntry>[src]

Returns all queue entries at least as old as the specified timestamp.

Trait Implementations

impl CLTyped for Queue[src]

impl Clone for Queue[src]

impl Default for Queue[src]

impl FromBytes for Queue[src]

impl PartialEq<Queue> for Queue[src]

impl StructuralPartialEq for Queue[src]

impl ToBytes for Queue[src]

Auto Trait Implementations

impl Send for Queue

impl Sync for Queue

impl Unpin for Queue

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