pub enum StreamEvent<M, E> {
Message(M),
PeerHalfClosed,
Terminal(Result<(), E>),
}Expand description
One observable item received from a bidirectional stream.
Variants§
Message(M)
One ordered message from the remote side.
PeerHalfClosed
The remote side closed only its sending direction.
Terminal(Result<(), E>)
The stream’s one terminal outcome. Runtime failures use the outer Result.
Trait Implementations§
Source§impl<M: Clone, E: Clone> Clone for StreamEvent<M, E>
impl<M: Clone, E: Clone> Clone for StreamEvent<M, E>
Source§fn clone(&self) -> StreamEvent<M, E>
fn clone(&self) -> StreamEvent<M, E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<M: PartialEq, E: PartialEq> StructuralPartialEq for StreamEvent<M, E>
Auto Trait Implementations§
impl<M, E> Freeze for StreamEvent<M, E>
impl<M, E> RefUnwindSafe for StreamEvent<M, E>where
M: RefUnwindSafe,
E: RefUnwindSafe,
impl<M, E> Send for StreamEvent<M, E>
impl<M, E> Sync for StreamEvent<M, E>
impl<M, E> Unpin for StreamEvent<M, E>
impl<M, E> UnsafeUnpin for StreamEvent<M, E>where
M: UnsafeUnpin,
E: UnsafeUnpin,
impl<M, E> UnwindSafe for StreamEvent<M, E>where
M: UnwindSafe,
E: 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