pub struct AccessTokenError { /* private fields */ }
Expand description

Represents parameters of an error in an Issuing Error Response.

This is used for both access token requests, and token refresh requests as they use the same internal error representations in the RFC as well.

Implementations§

source§

impl AccessTokenError

source

pub fn set_type(&mut self, new_type: AccessTokenErrorType)

Set error type

source

pub fn kind(&mut self) -> AccessTokenErrorType

Get the formal kind of error.

This can not currently be changed as to uphold the inner invariants for RFC compliance.

source

pub fn explain<D: Into<Cow<'static, str>>>(&mut self, description: D)

Provide a short text explanation for the error.

source

pub fn explain_uri(&mut self, uri: Url)

A uri identifying a resource explaining the error in detail.

source

pub fn iter(&self) -> <Self as IntoIterator>::IntoIter

Iterate over the key value pairs that describe this error.

These pairs must be added to the detailed description of an error. The pairs will be encoded in the json body of the Bad Request response.

Trait Implementations§

source§

impl Clone for AccessTokenError

source§

fn clone(&self) -> AccessTokenError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccessTokenError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccessTokenError

source§

fn default() -> Self

Construct a AccessTokenError with no extra information.

Will produce a generic InvalidRequest error without any description or error uri which would provide additional information for the client.

source§

impl IntoIterator for &AccessTokenError

§

type Item = (&'static str, Cow<'static, str>)

The type of the elements being iterated over.
§

type IntoIter = IntoIter<(&'static str, Cow<'static, str>), Global>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl IntoIterator for AccessTokenError

The error as key-value pairs.

§

type Item = (&'static str, Cow<'static, str>)

The type of the elements being iterated over.
§

type IntoIter = IntoIter<(&'static str, Cow<'static, str>), Global>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V