Enum nbio::ReceiveOutcome
source · pub enum ReceiveOutcome<T> {
Payload(T),
Buffered,
Idle,
}
Expand description
Returned by the Receive::receive
function, providing the outcome or information about the receive action.
The generic type T
will match the cooresponding Receive::ReceivePayload
.
Variants§
Payload(T)
Contains a reference to payload received from the Receive::receive
action.
Buffered
Data was buffered. This means a partial payload was received, but could not be returned as complete Data
.
Idle
No work was done. This is useful to signal to a scheduler or idle strategy that it may be time to yield.
Trait Implementations§
source§impl<T: Clone> Clone for ReceiveOutcome<T>
impl<T: Clone> Clone for ReceiveOutcome<T>
Auto Trait Implementations§
impl<T> Freeze for ReceiveOutcome<T>where
T: Freeze,
impl<T> RefUnwindSafe for ReceiveOutcome<T>where
T: RefUnwindSafe,
impl<T> Send for ReceiveOutcome<T>where
T: Send,
impl<T> Sync for ReceiveOutcome<T>where
T: Sync,
impl<T> Unpin for ReceiveOutcome<T>where
T: Unpin,
impl<T> UnwindSafe for ReceiveOutcome<T>where
T: 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