pub struct ClientError {
pub error: ClientErrorCode,
pub error_description: Option<Cow<'static, str>>,
}
Expand description
A client error returned by an authorization server.
To construct this with a default description for the error code, use its
From<ClientErrorCode>
implementation.
Fields§
§error: ClientErrorCode
The error code.
error_description: Option<Cow<'static, str>>
A human-readable description of the error.
Implementations§
source§impl ClientError
impl ClientError
sourcepub const fn new(
error: ClientErrorCode,
error_description: &'static str,
) -> Self
pub const fn new( error: ClientErrorCode, error_description: &'static str, ) -> Self
Creates a new ClientError
with the given error code and description.
sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Changes the description of this ClientError
with the given String
.
Trait Implementations§
source§impl Clone for ClientError
impl Clone for ClientError
source§fn clone(&self) -> ClientError
fn clone(&self) -> ClientError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ClientError
impl Debug for ClientError
source§impl<'de> Deserialize<'de> for ClientError
impl<'de> Deserialize<'de> for ClientError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ClientErrorCode> for ClientError
impl From<ClientErrorCode> for ClientError
source§fn from(error: ClientErrorCode) -> Self
fn from(error: ClientErrorCode) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ClientError
impl RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnwindSafe for ClientError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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