pub enum StreamResult {
Completed,
Cancelled,
Dropped,
}
Available on crate features
runtime
and component-model
and component-model-async
only.Expand description
Represents the state of a Stream{Producer,Consumer}
.
Variants§
Completed
The operation completed normally, and the producer or consumer may be able to produce or consume more items, respectively.
Cancelled
The operation was interrupted (i.e. it wrapped up early after receiving
a finish
parameter value of true in a call to poll_produce
or
poll_consume
), and the producer or consumer may be able to produce or
consume more items, respectively.
Dropped
The operation completed normally, but the producer or consumer will not able to produce or consume more items, respectively.
Trait Implementations§
Source§impl Clone for StreamResult
impl Clone for StreamResult
Source§fn clone(&self) -> StreamResult
fn clone(&self) -> StreamResult
Returns a duplicate 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 Debug for StreamResult
impl Debug for StreamResult
impl Copy for StreamResult
Auto Trait Implementations§
impl Freeze for StreamResult
impl RefUnwindSafe for StreamResult
impl Send for StreamResult
impl Sync for StreamResult
impl Unpin for StreamResult
impl UnwindSafe for StreamResult
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> 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