#[non_exhaustive]pub enum AmqpError {
Connect(Box<dyn StdError + Send + Sync>),
Publish(Box<dyn StdError + Send + Sync>),
Subscribe(Box<dyn StdError + Send + Sync>),
Consume(Box<dyn StdError + Send + Sync>),
Declare(Box<dyn StdError + Send + Sync>),
Request(Box<dyn StdError + Send + Sync>),
RequestTimeout(Duration),
NotConnected,
InvalidOptions(String),
}Expand description
Errors returned by LapinBroker and the types it hands out.
Underlying lapin errors are boxed as sources so the client library
does not leak into this crate’s public API surface.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connect(Box<dyn StdError + Send + Sync>)
Establishing or closing the connection failed.
Publish(Box<dyn StdError + Send + Sync>)
Publishing a message failed, or the broker refused to confirm it.
Subscribe(Box<dyn StdError + Send + Sync>)
Opening a subscription (channel, QoS, or consume) failed.
Consume(Box<dyn StdError + Send + Sync>)
Receiving a delivery from an open consumer failed.
Declare(Box<dyn StdError + Send + Sync>)
Declaring the expected topology (exchange, queue, or binding) failed.
Request(Box<dyn StdError + Send + Sync>)
Sending a request or receiving its reply failed.
RequestTimeout(Duration)
No reply arrived within the caller’s deadline.
The pending request is dropped; a reply arriving later is discarded.
NotConnected
An operation needed the live connection before Broker::connect resolved it.
The runtime connects the broker once at startup; a publisher handed out earlier resolves
the shared connection on first use. Seeing this error means the operation ran before
connect completed (or after shutdown).
InvalidOptions(String)
The requested combination of options cannot be executed.
The message names the offending option and the remediation.
Trait Implementations§
Source§impl Error for AmqpError
impl Error for AmqpError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()