Enum ordered_stream::PollResult
source · pub enum PollResult<Ordering, Data> {
Item {
data: Data,
ordering: Ordering,
},
NoneBefore,
Terminated,
}
Expand description
The result of a OrderedStream::poll_next_before
operation.
Variants§
Item
An item with a corresponding ordering token.
NoneBefore
This stream will not return any items prior to the given point.
Terminated
This stream is terminated and should not be polled again.
Implementations§
source§impl<D, T> PollResult<T, D>
impl<D, T> PollResult<T, D>
source§impl<T, D, E> PollResult<T, Result<D, E>>
impl<T, D, E> PollResult<T, Result<D, E>>
sourcepub fn transpose_result(self) -> Result<PollResult<T, D>, E>
pub fn transpose_result(self) -> Result<PollResult<T, D>, E>
Extract the error of a Result
item.
sourcepub fn transpose_result_item(self) -> Result<PollResult<T, D>, (T, E)>
pub fn transpose_result_item(self) -> Result<PollResult<T, D>, (T, E)>
Extract the error and ordering from a Result
item.
Trait Implementations§
source§impl<Ordering: Clone, Data: Clone> Clone for PollResult<Ordering, Data>
impl<Ordering: Clone, Data: Clone> Clone for PollResult<Ordering, Data>
source§fn clone(&self) -> PollResult<Ordering, Data>
fn clone(&self) -> PollResult<Ordering, Data>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Ordering: Ord, Data: Ord> Ord for PollResult<Ordering, Data>
impl<Ordering: Ord, Data: Ord> Ord for PollResult<Ordering, Data>
source§fn cmp(&self, other: &PollResult<Ordering, Data>) -> Ordering
fn cmp(&self, other: &PollResult<Ordering, Data>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<Ordering: PartialEq, Data: PartialEq> PartialEq<PollResult<Ordering, Data>> for PollResult<Ordering, Data>
impl<Ordering: PartialEq, Data: PartialEq> PartialEq<PollResult<Ordering, Data>> for PollResult<Ordering, Data>
source§fn eq(&self, other: &PollResult<Ordering, Data>) -> bool
fn eq(&self, other: &PollResult<Ordering, Data>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Ordering: PartialOrd, Data: PartialOrd> PartialOrd<PollResult<Ordering, Data>> for PollResult<Ordering, Data>
impl<Ordering: PartialOrd, Data: PartialOrd> PartialOrd<PollResult<Ordering, Data>> for PollResult<Ordering, Data>
source§fn partial_cmp(&self, other: &PollResult<Ordering, Data>) -> Option<Ordering>
fn partial_cmp(&self, other: &PollResult<Ordering, Data>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more