Enum TryRecvError
pub enum TryRecvError {
Empty,
Closed,
Lagged(u64),
}
sync only.Variants
Empty
The channel is currently empty. There are still active Sender handles, so data may yet become available.
Closed
There are no more active senders implying no further messages will ever be sent.
Lagged(u64)
The receiver lagged too far behind: one or more messages were overwritten in the ring buffer before this receiver could read them.
The receiver remains subscribed. Its internal cursor has been advanced to the oldest message still retained by the channel; the next successful try_recv call returns that message (unless further sends overwrite it first).
The u64 is the number of messages that were skipped (dropped before the receiver’s previous cursor position).
Trait Implementations
impl Clone for TryRecvError
fn clone(&self) -> TryRecvError
fn clone_from(&mut self, source: &Self)
source. Read more
impl Debug for TryRecvError
impl Display for TryRecvError
impl Eq for TryRecvError
impl Error for TryRecvError
fn source(&self) -> Option<&(dyn Error + 'static)>
fn description(&self) -> &str
use the Display impl or to_string()
impl PartialEq for TryRecvError
impl StructuralPartialEq for TryRecvError
Auto Trait Implementations
impl Freeze for TryRecvError
impl RefUnwindSafe for TryRecvError
impl Send for TryRecvError
impl Sync for TryRecvError
impl Unpin for TryRecvError
impl UnsafeUnpin for TryRecvError
impl UnwindSafe for TryRecvError
Blanket Implementations
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Twhere T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)
impl<T> Instrument for T
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> ToString for T
impl<T> WithSubscriber for T
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/sync/broadcast/error/enum.TryRecvError.html