#[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),
Closed {
target: String,
},
Transaction(String),
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.
Closed
An operation ran against a connection that has already shut down.
The ladder makes misuse through the owner of the connected broker a compile error, so this reports the case it cannot cover: a handle aliasing the connection (a publisher paired before the shutdown, a requester clone) used afterwards, which must fail rather than silently succeed against a dead connection.
Transaction(String)
A transaction call ran out of order on a transactional publisher.
A commit or an abort with no open transaction, or a second begin while one is open. The message names the offending call.
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()