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: PartialOrd, Data: PartialOrd> PartialOrd for PollResult<Ordering, Data>
impl<Ordering: PartialOrd, Data: PartialOrd> PartialOrd for PollResult<Ordering, Data>
impl<Ordering: Copy, Data: Copy> Copy for PollResult<Ordering, Data>
impl<Ordering: Eq, Data: Eq> Eq for PollResult<Ordering, Data>
impl<Ordering, Data> StructuralPartialEq for PollResult<Ordering, Data>
Auto Trait Implementations§
impl<Ordering, Data> Freeze for PollResult<Ordering, Data>
impl<Ordering, Data> RefUnwindSafe for PollResult<Ordering, Data>where
Data: RefUnwindSafe,
Ordering: RefUnwindSafe,
impl<Ordering, Data> Send for PollResult<Ordering, Data>
impl<Ordering, Data> Sync for PollResult<Ordering, Data>
impl<Ordering, Data> Unpin for PollResult<Ordering, Data>
impl<Ordering, Data> UnwindSafe for PollResult<Ordering, Data>where
Data: UnwindSafe,
Ordering: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)