pub struct PubsubError;
Expand description
Error type returned when a Pubsub operation fails.
This error occurs when:
- The Pubsub system has been closed and no more messages can be received
- A subscriber attempts to receive a message after the Pubsub system has been dropped
§Examples
// let pubsub = Pubsub::new();
// let subscriber = pubsub.subscribe(vec!["topic1"]).await;
// drop(pubsub);
// let result = subscriber.recv().await;
// assert!(matches!(result, Err(PubsubError)));
Trait Implementations§
Source§impl Clone for PubsubError
impl Clone for PubsubError
Source§fn clone(&self) -> PubsubError
fn clone(&self) -> PubsubError
Returns a copy 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 Debug for PubsubError
impl Debug for PubsubError
Source§impl Display for PubsubError
impl Display for PubsubError
Source§impl Error for PubsubError
impl Error for PubsubError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for PubsubError
impl PartialEq for PubsubError
impl Copy for PubsubError
impl Eq for PubsubError
impl StructuralPartialEq for PubsubError
Auto Trait Implementations§
impl Freeze for PubsubError
impl RefUnwindSafe for PubsubError
impl Send for PubsubError
impl Sync for PubsubError
impl Unpin for PubsubError
impl UnwindSafe for PubsubError
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