pub enum Error {
Show 15 variants
Nats(Error),
Connect(ConnectError),
Publish(PublishError),
Subscribe(SubscribeError),
MsgPackSerialize(Error),
MsgPackDeserialize(Error),
JetStream(String),
JetStreamContext(CreateStreamError),
JetStreamConsumer(String),
JetStreamStream(String),
Request(RequestError),
Timeout,
SubscriberClosed,
PublisherClosed,
InvalidConfig(String),
}Expand description
The main error type for intercom operations.
Variants§
Nats(Error)
Error from the underlying NATS client.
Connect(ConnectError)
Error connecting to NATS.
Publish(PublishError)
Error publishing a message.
Subscribe(SubscribeError)
Error subscribing to a subject.
MsgPackSerialize(Error)
Error serializing a message with MessagePack.
MsgPackDeserialize(Error)
Error deserializing a message with MessagePack.
JetStream(String)
Error from JetStream operations.
JetStreamContext(CreateStreamError)
Error creating a JetStream context.
JetStreamConsumer(String)
Error creating a JetStream consumer.
JetStreamStream(String)
Error with JetStream stream operations.
Request(RequestError)
Request error.
Timeout
Timeout error.
SubscriberClosed
The subscriber was closed.
PublisherClosed
The publisher was closed.
InvalidConfig(String)
Invalid configuration.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl From<Error<ConnectErrorKind>> for Error
Source§fn from(source: ConnectError) -> Self
fn from(source: ConnectError) -> Self
Converts to this type from the input type.
Source§impl From<Error<CreateStreamErrorKind>> for Error
impl From<Error<CreateStreamErrorKind>> for Error
Source§fn from(source: CreateStreamError) -> Self
fn from(source: CreateStreamError) -> Self
Converts to this type from the input type.
Source§impl From<Error<PublishErrorKind>> for Error
impl From<Error<PublishErrorKind>> for Error
Source§fn from(source: PublishError) -> Self
fn from(source: PublishError) -> Self
Converts to this type from the input type.
Source§impl From<Error<RequestErrorKind>> for Error
impl From<Error<RequestErrorKind>> for Error
Source§fn from(source: RequestError) -> Self
fn from(source: RequestError) -> Self
Converts to this type from the input type.
Source§impl From<SubscribeError> for Error
impl From<SubscribeError> for Error
Source§fn from(source: SubscribeError) -> Self
fn from(source: SubscribeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Mutably borrows from an owned value. Read more