pub enum MessagingError {
Show 19 variants
Connection(String),
Publish(String),
Subscribe(String),
Acknowledge(String),
Serialization(String),
Deserialization(String),
Timeout(String),
Authentication(String),
Authorization(String),
Configuration(String),
ChannelClosed(String),
NotFound(String),
AlreadyExists(String),
ResourceExhausted(String),
Rejected(String),
Expired(String),
BrokerError(String),
Io(Error),
Other(String),
}Expand description
Errors that can occur during messaging operations
Variants§
Connection(String)
Failed to connect to the broker
Publish(String)
Failed to publish a message
Subscribe(String)
Failed to subscribe to a topic/queue
Acknowledge(String)
Failed to acknowledge a message
Serialization(String)
Failed to serialize a message
Deserialization(String)
Failed to deserialize a message
Timeout(String)
Operation timed out
Authentication(String)
Authentication failed
Authorization(String)
Authorization failed
Configuration(String)
Invalid configuration
ChannelClosed(String)
Channel/connection is closed
NotFound(String)
Queue/topic not found
AlreadyExists(String)
Queue/topic already exists
ResourceExhausted(String)
Resource exhausted (e.g., too many connections)
Rejected(String)
Message was rejected by the broker
Expired(String)
Message expired (TTL exceeded)
BrokerError(String)
Internal broker error
Io(Error)
IO error
Other(String)
Other errors
Implementations§
Source§impl MessagingError
impl MessagingError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable
Sourcepub fn is_connection_error(&self) -> bool
pub fn is_connection_error(&self) -> bool
Check if this error indicates a connection issue
Trait Implementations§
Source§impl Debug for MessagingError
impl Debug for MessagingError
Source§impl Display for MessagingError
impl Display for MessagingError
Source§impl Error for MessagingError
impl Error for MessagingError
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()
Source§impl From<Error<ConnectErrorKind>> for MessagingError
Available on crate feature nats only.
impl From<Error<ConnectErrorKind>> for MessagingError
Available on crate feature
nats only.Source§fn from(err: ConnectError) -> Self
fn from(err: ConnectError) -> Self
Converts to this type from the input type.
Source§impl From<Error<PublishErrorKind>> for MessagingError
Available on crate feature nats only.
impl From<Error<PublishErrorKind>> for MessagingError
Available on crate feature
nats only.Source§fn from(err: PublishError) -> Self
fn from(err: PublishError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for MessagingError
impl From<Error> for MessagingError
Source§impl From<Error> for MessagingError
Available on crate feature rabbitmq only.
impl From<Error> for MessagingError
Available on crate feature
rabbitmq only.Source§impl From<KafkaError> for MessagingError
Available on crate feature kafka only.
impl From<KafkaError> for MessagingError
Available on crate feature
kafka only.Source§fn from(err: KafkaError) -> Self
fn from(err: KafkaError) -> Self
Converts to this type from the input type.
Source§impl From<SubscribeError> for MessagingError
Available on crate feature nats only.
impl From<SubscribeError> for MessagingError
Available on crate feature
nats only.Source§fn from(err: SubscribeError) -> Self
fn from(err: SubscribeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MessagingError
impl !RefUnwindSafe for MessagingError
impl Send for MessagingError
impl Sync for MessagingError
impl Unpin for MessagingError
impl !UnwindSafe for MessagingError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.