pub enum RecvOutcome<T> {
Data(T),
Empty,
Closed,
}Expand description
Result of attempting to receive a message.
use daedalus_core::channels::{bounded, ChannelRecv, RecvOutcome};
let (_tx, rx) = bounded::<u8>(1);
assert_eq!(rx.try_recv(), RecvOutcome::Empty);Variants§
Trait Implementations§
Source§impl<T: Clone> Clone for RecvOutcome<T>
impl<T: Clone> Clone for RecvOutcome<T>
Source§fn clone(&self) -> RecvOutcome<T>
fn clone(&self) -> RecvOutcome<T>
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<T: Debug> Debug for RecvOutcome<T>
impl<T: Debug> Debug for RecvOutcome<T>
Source§impl<T: PartialEq> PartialEq for RecvOutcome<T>
impl<T: PartialEq> PartialEq for RecvOutcome<T>
impl<T: Eq> Eq for RecvOutcome<T>
impl<T> StructuralPartialEq for RecvOutcome<T>
Auto Trait Implementations§
impl<T> Freeze for RecvOutcome<T>where
T: Freeze,
impl<T> RefUnwindSafe for RecvOutcome<T>where
T: RefUnwindSafe,
impl<T> Send for RecvOutcome<T>where
T: Send,
impl<T> Sync for RecvOutcome<T>where
T: Sync,
impl<T> Unpin for RecvOutcome<T>where
T: Unpin,
impl<T> UnwindSafe for RecvOutcome<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