[][src]Struct oauth2::StandardErrorResponse

pub struct StandardErrorResponse<T: ErrorResponseType> { /* fields omitted */ }

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

impl<T: ErrorResponseType> StandardErrorResponse<T>[src]

pub fn new(
    error: T,
    error_description: Option<String>,
    error_uri: Option<String>
) -> Self
[src]

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: Clone + ErrorResponseType> Clone for StandardErrorResponse<T>[src]

impl<T: Debug + ErrorResponseType> Debug for StandardErrorResponse<T>[src]

impl<'de, T: ErrorResponseType> Deserialize<'de> for StandardErrorResponse<T> where
    T: ErrorResponseType
[src]

impl<TE> Display for StandardErrorResponse<TE> where
    TE: ErrorResponseType + Display
[src]

impl<T> ErrorResponse for StandardErrorResponse<T> where
    T: ErrorResponseType + 'static, 
[src]

impl<T: PartialEq + ErrorResponseType> PartialEq<StandardErrorResponse<T>> for StandardErrorResponse<T>[src]

impl<T: ErrorResponseType> Serialize for StandardErrorResponse<T> where
    T: ErrorResponseType
[src]

impl<T: ErrorResponseType> StructuralPartialEq for StandardErrorResponse<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for StandardErrorResponse<T> where
    T: RefUnwindSafe

impl<T> Send for StandardErrorResponse<T>

impl<T> Sync for StandardErrorResponse<T>

impl<T> Unpin for StandardErrorResponse<T> where
    T: Unpin

impl<T> UnwindSafe for StandardErrorResponse<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,