#[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>,
},
Detach {
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),
Transaction(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
Detach
Closing a link during shutdown failed, so the peer may still consider it attached.
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.
Transaction(String)
A transaction operation was invoked in a state that cannot serve it.
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()
Auto Trait Implementations§
impl !RefUnwindSafe for AmqpError
impl !UnwindSafe for AmqpError
impl Freeze for AmqpError
impl Send for AmqpError
impl Sync for AmqpError
impl Unpin for AmqpError
impl UnsafeUnpin for AmqpError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more