pub(crate) enum TryPopResult<T> {
Ok(T),
Empty,
Closed,
Busy,
}Expand description
Return value of Rx::try_pop.
Variants§
Ok(T)
Successfully popped a value.
Empty
The channel is empty.
Note that list.rs only tracks the close state set by senders. If the
channel is closed by Rx::close(), then TryPopResult::Empty is still
returned, and the close state needs to be handled by chan.rs.
Closed
The channel is empty and closed.
Returned when the send half is closed (all senders dropped).
Busy
The channel is not empty, but the first value is being written.
Auto Trait Implementations§
impl<T> Freeze for TryPopResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for TryPopResult<T>where
T: RefUnwindSafe,
impl<T> Send for TryPopResult<T>where
T: Send,
impl<T> Sync for TryPopResult<T>where
T: Sync,
impl<T> Unpin for TryPopResult<T>where
T: Unpin,
impl<T> UnwindSafe for TryPopResult<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