Struct oauth2::ErrorResponse
source · pub struct ErrorResponse<T: ErrorResponseType> { /* private fields */ }
Expand description
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.
Implementations§
source§impl<T: ErrorResponseType> ErrorResponse<T>
impl<T: ErrorResponseType> ErrorResponse<T>
sourcepub fn error(&self) -> &T
pub fn error(&self) -> &T
REQUIRED. A single ASCII error code deserialized to the generic parameter
ErrorResponseType
.
sourcepub fn error_description(&self) -> Option<&String>
pub fn error_description(&self) -> Option<&String>
OPTIONAL. Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred.
Trait Implementations§
source§impl<T: Debug + ErrorResponseType> Debug for ErrorResponse<T>
impl<T: Debug + ErrorResponseType> Debug for ErrorResponse<T>
source§impl<'de, T> Deserialize<'de> for ErrorResponse<T>where
T: ErrorResponseType,
impl<'de, T> Deserialize<'de> for ErrorResponse<T>where
T: ErrorResponseType,
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