pub struct Ready<N: Network> { /* private fields */ }Implementations§
Source§impl<N: Network> Ready<N>
impl<N: Network> Ready<N>
Sourcepub fn num_transmissions(&self) -> usize
pub fn num_transmissions(&self) -> usize
Returns the number of transmissions in the ready queue.
Sourcepub fn num_ratifications(&self) -> usize
pub fn num_ratifications(&self) -> usize
Returns the number of ratifications in the ready queue.
Sourcepub fn num_solutions(&self) -> usize
pub fn num_solutions(&self) -> usize
Returns the number of solutions in the ready queue.
Sourcepub fn num_transactions(&self) -> usize
pub fn num_transactions(&self) -> usize
Returns the number of transactions in the ready queue.
Sourcepub fn transmission_ids(&self) -> IndexSet<TransmissionID<N>>
pub fn transmission_ids(&self) -> IndexSet<TransmissionID<N>>
Returns the transmission IDs in the ready queue.
Sourcepub fn transmissions(&self) -> IndexMap<TransmissionID<N>, Transmission<N>>
pub fn transmissions(&self) -> IndexMap<TransmissionID<N>, Transmission<N>>
Returns the transmissions in the ready queue.
Sourcepub fn solutions(
&self,
) -> impl '_ + Iterator<Item = (SolutionID<N>, Data<Solution<N>>)>
pub fn solutions( &self, ) -> impl '_ + Iterator<Item = (SolutionID<N>, Data<Solution<N>>)>
Returns the solutions in the ready queue.
Sourcepub fn transactions(
&self,
) -> impl '_ + Iterator<Item = (N::TransactionID, Data<Transaction<N>>)>
pub fn transactions( &self, ) -> impl '_ + Iterator<Item = (N::TransactionID, Data<Transaction<N>>)>
Returns the transactions in the ready queue.
Source§impl<N: Network> Ready<N>
impl<N: Network> Ready<N>
Sourcepub fn contains(&self, transmission_id: impl Into<TransmissionID<N>>) -> bool
pub fn contains(&self, transmission_id: impl Into<TransmissionID<N>>) -> bool
Returns true if the ready queue contains the specified transmission ID.
Sourcepub fn get(
&self,
transmission_id: impl Into<TransmissionID<N>>,
) -> Option<Transmission<N>>
pub fn get( &self, transmission_id: impl Into<TransmissionID<N>>, ) -> Option<Transmission<N>>
Returns the transmission, given the specified transmission ID.
Sourcepub fn insert(
&self,
transmission_id: impl Into<TransmissionID<N>>,
transmission: Transmission<N>,
) -> bool
pub fn insert( &self, transmission_id: impl Into<TransmissionID<N>>, transmission: Transmission<N>, ) -> bool
Inserts the specified (transmission ID, transmission) to the ready queue.
Returns true if the transmission is new, and was added to the ready queue.
Sourcepub fn drain(
&self,
num_transmissions: usize,
) -> IndexMap<TransmissionID<N>, Transmission<N>>
pub fn drain( &self, num_transmissions: usize, ) -> IndexMap<TransmissionID<N>, Transmission<N>>
Removes up to the specified number of transmissions and returns them.
Trait Implementations§
Auto Trait Implementations§
impl<N> Freeze for Ready<N>
impl<N> !RefUnwindSafe for Ready<N>
impl<N> Send for Ready<N>
impl<N> Sync for Ready<N>
impl<N> Unpin for Ready<N>
impl<N> !UnwindSafe for Ready<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more