Type Alias async_nats::client::RequestError

source ·
pub type RequestError = Error<RequestErrorKind>;
Expand description

Error returned when a core NATS request fails. To be enumerate over the variants, call RequestError::kind.

Aliased Type§

struct RequestError { /* private fields */ }

Implementations§

source§

impl<Kind> Error<Kind>where Kind: Clone + Debug + Display + PartialEq,

source

pub fn kind(&self) -> Kind

Trait Implementations§

source§

impl<Kind> Debug for Error<Kind>where Kind: Clone + Debug + Display + PartialEq + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Kind> Display for Error<Kind>where Kind: Clone + Debug + Display + PartialEq,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Kind> Error for Error<Kind>where Kind: Clone + Debug + Display + PartialEq,

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl<Kind> From<Kind> for Error<Kind>where Kind: Clone + Debug + Display + PartialEq,

source§

fn from(kind: Kind) -> Self

Converts to this type from the input type.
source§

impl From<PublishError> for RequestError

source§

fn from(e: PublishError) -> Self

Converts to this type from the input type.
source§

impl From<SubscribeError> for RequestError

source§

fn from(e: SubscribeError) -> Self

Converts to this type from the input type.