#[non_exhaustive]pub enum PulsarError {
Connect(Box<dyn StdError + Send + Sync>),
Subscribe {
topic: String,
source: Box<dyn StdError + Send + Sync>,
},
Receive {
topic: String,
source: Box<dyn StdError + Send + Sync>,
},
Publish {
topic: String,
source: Box<dyn StdError + Send + Sync>,
},
NotConnected,
Invalid(String),
}Expand description
Errors returned by the Apache Pulsar broker.
One enum for the whole crate, variants by source, per the RustStream broker conventions.
The wrapped sources are boxed std errors so the public API does not leak the client’s
error types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Connect(Box<dyn StdError + Send + Sync>)
Establishing the client connection failed.
Subscribe
Creating a consumer failed.
Fields
Receive
The consumer stream failed or ended permanently.
Fields
Publish
Creating a producer or sending a message failed.
Fields
NotConnected
The handle is used before connect filled the shared connection, or after shutdown.
Invalid(String)
A topic name or subscription descriptor is invalid.
Trait Implementations§
Source§impl Debug for PulsarError
impl Debug for PulsarError
Source§impl Display for PulsarError
impl Display for PulsarError
Source§impl Error for PulsarError
impl Error for PulsarError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for PulsarError
impl !UnwindSafe for PulsarError
impl Freeze for PulsarError
impl Send for PulsarError
impl Sync for PulsarError
impl Unpin for PulsarError
impl UnsafeUnpin for PulsarError
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