#[non_exhaustive]pub enum AmqpError {
Connect(Box<dyn StdError + Send + Sync>),
Session(Box<dyn StdError + Send + Sync>),
Attach {
address: String,
source: Box<dyn StdError + Send + Sync>,
},
Publish {
address: String,
source: Box<dyn StdError + Send + Sync>,
},
PublishNotAccepted {
address: String,
outcome: String,
},
Receive {
address: String,
source: Box<dyn StdError + Send + Sync>,
},
UnsupportedBody {
address: String,
},
RequestTimeout,
NotConnected,
InvalidAddress(String),
}Expand description
Errors returned by the AMQP 1.0 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 fe2o3-amqp types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connect(Box<dyn StdError + Send + Sync>)
Opening the connection (TCP, TLS, SASL, or the AMQP handshake) failed.
Session(Box<dyn StdError + Send + Sync>)
Beginning a session on the live connection failed.
Attach
Attaching a link (sender or receiver) failed.
Fields
Publish
The transport failed while sending a message.
Fields
PublishNotAccepted
The peer settled an outgoing message with a non-accepted outcome (rejected, released, or modified), so the message is not on the broker.
Fields
Receive
The transport failed while receiving a message.
Fields
UnsupportedBody
A delivery arrived whose body the crate cannot expose as bytes (an AMQP value section
that is neither binary nor a string).
RequestTimeout
A request/reply round trip did not produce a reply within the caller’s timeout.
NotConnected
The handle is used before connect filled the shared connection, or after shutdown.
InvalidAddress(String)
A subscription descriptor is invalid.
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()