#[non_exhaustive]pub enum RpcClientError {
Transport(TransportError),
Codec(CratestackError),
InvalidResponse(String),
BadInput(String),
Envelope(EnvelopeError),
Remote(RpcRemoteError),
}Expand description
Top-level error returned by the RPC client. Mirrors ClientError
(the REST error type) but reports server-side failures as
RpcRemoteError { code, message, details } rather than the
REST-shaped CratestackErrorResponse.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Transport(TransportError)
Codec(CratestackError)
InvalidResponse(String)
BadInput(String)
Envelope(EnvelopeError)
The signed transport failed (cratestack#1007).
Remote(RpcRemoteError)
Implementations§
Source§impl RpcClientError
impl RpcClientError
Sourcepub fn remote(&self) -> Option<&RpcRemoteError>
pub fn remote(&self) -> Option<&RpcRemoteError>
The server’s answer, for an RpcClientError::Remote.
Sourcepub fn challenges(&self) -> &[String]
pub fn challenges(&self) -> &[String]
The WWW-Authenticate values of an RpcClientError::Remote, raw
and in order; empty for any other variant.
Source§impl RpcClientError
impl RpcClientError
Sourcepub fn step_up(&self) -> Option<StepUpRequired>
pub fn step_up(&self) -> Option<StepUpRequired>
The step-up refusal of an RpcClientError::Remote; None for
any other variant.
Trait Implementations§
Source§impl Debug for RpcClientError
impl Debug for RpcClientError
Source§impl Display for RpcClientError
impl Display for RpcClientError
Source§impl Error for RpcClientError
impl Error for RpcClientError
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<ClientError> for RpcClientError
impl From<ClientError> for RpcClientError
Source§fn from(error: ClientError) -> Self
fn from(error: ClientError) -> Self
Converts to this type from the input type.
Source§impl From<CratestackError> for RpcClientError
impl From<CratestackError> for RpcClientError
Source§impl From<EnvelopeError> for RpcClientError
impl From<EnvelopeError> for RpcClientError
Source§fn from(source: EnvelopeError) -> Self
fn from(source: EnvelopeError) -> Self
Converts to this type from the input type.
Source§impl StepUpError for RpcClientError
impl StepUpError for RpcClientError
Source§fn step_up(&self) -> Option<StepUpRequired>
fn step_up(&self) -> Option<StepUpRequired>
The refusal, when this error is one.
Auto Trait Implementations§
impl !RefUnwindSafe for RpcClientError
impl !UnwindSafe for RpcClientError
impl Freeze for RpcClientError
impl Send for RpcClientError
impl Sync for RpcClientError
impl Unpin for RpcClientError
impl UnsafeUnpin for RpcClientError
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more