[−][src]Struct oauth2::ErrorResponse
Error response returned by server after requesting an access token.
The fields in this structure are defined in
Section 5.2 of RFC 6749. This
trait is parameterized by a ErrorResponseType
to support error types specific to future OAuth2
authentication schemes and extensions.
Methods
impl<T: ErrorResponseType> ErrorResponse<T>
[src]
pub fn new(
error: T,
error_description: Option<String>,
error_uri: Option<String>
) -> Self
[src]
error: T,
error_description: Option<String>,
error_uri: Option<String>
) -> Self
Instantiate a new ErrorResponse
.
Arguments
error
- REQUIRED. A single ASCII error code deserialized to the generic parameter.ErrorResponseType
.error_description
- OPTIONAL. Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred. Values for this parameter MUST NOT include characters outside the set%x20-21 / %x23-5B / %x5D-7E
.error_uri
- OPTIONAL. A URI identifying a human-readable web page with information about the error used to provide the client developer with additional information about the error. Values for the "error_uri" parameter MUST conform to the URI-reference syntax and thus MUST NOT include characters outside the set%x21 / %x23-5B / %x5D-7E
.
pub fn error(&self) -> &T
[src]
REQUIRED. A single ASCII error code deserialized to the generic parameter
ErrorResponseType
.
pub fn error_description(&self) -> Option<&String>
[src]
OPTIONAL. Human-readable ASCII text providing additional information, used to assist
the client developer in understanding the error that occurred. Values for this
parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E
.
pub fn error_uri(&self) -> Option<&String>
[src]
OPTIONAL. A URI identifying a human-readable web page with information about the error,
used to provide the client developer with additional information about the error.
Values for the "error_uri" parameter MUST conform to the URI-reference syntax and
thus MUST NOT include characters outside the set %x21 / %x23-5B / %x5D-7E
.
Trait Implementations
impl<T: PartialEq + ErrorResponseType> PartialEq<ErrorResponse<T>> for ErrorResponse<T>
[src]
fn eq(&self, other: &ErrorResponse<T>) -> bool
[src]
fn ne(&self, other: &ErrorResponse<T>) -> bool
[src]
impl<T: Clone + ErrorResponseType> Clone for ErrorResponse<T>
[src]
fn clone(&self) -> ErrorResponse<T>
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Debug + ErrorResponseType> Debug for ErrorResponse<T>
[src]
impl<TE: ErrorResponseType> Display for ErrorResponse<TE>
[src]
impl<T: ErrorResponseType> Serialize for ErrorResponse<T> where
T: ErrorResponseType,
[src]
T: ErrorResponseType,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de, T: ErrorResponseType> Deserialize<'de> for ErrorResponse<T> where
T: ErrorResponseType,
[src]
T: ErrorResponseType,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<T> Send for ErrorResponse<T>
impl<T> Sync for ErrorResponse<T>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Same for T
type Output = T
Should always be Self