[−][src]Struct casperlabs_proof_of_stake::Queue
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]
&mut self,
validator: PublicKey,
amount: U512,
timestamp: BlockTime
) -> Result<()>
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]
fn clone(&self) -> Queue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for Queue
[src]
impl FromBytes for Queue
[src]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>
[src]
fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>
[src]
impl PartialEq<Queue> for Queue
[src]
impl StructuralPartialEq for Queue
[src]
impl ToBytes for Queue
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,