Struct oxide_auth::code_grant::error::AccessTokenError
source · 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
impl AccessTokenError
sourcepub fn set_type(&mut self, new_type: AccessTokenErrorType)
pub fn set_type(&mut self, new_type: AccessTokenErrorType)
Set error type
sourcepub fn kind(&mut self) -> AccessTokenErrorType
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.
sourcepub fn explain<D: Into<Cow<'static, str>>>(&mut self, description: D)
pub fn explain<D: Into<Cow<'static, str>>>(&mut self, description: D)
Provide a short text explanation for the error.
sourcepub fn explain_uri(&mut self, uri: Url)
pub fn explain_uri(&mut self, uri: Url)
A uri identifying a resource explaining the error in detail.
sourcepub fn iter(&self) -> <Self as IntoIterator>::IntoIter
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
impl Clone for AccessTokenError
source§fn clone(&self) -> AccessTokenError
fn clone(&self) -> AccessTokenError
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 AccessTokenError
impl Debug for AccessTokenError
source§impl Default for AccessTokenError
impl Default for AccessTokenError
source§impl IntoIterator for &AccessTokenError
impl IntoIterator for &AccessTokenError
source§impl IntoIterator for AccessTokenError
impl IntoIterator for AccessTokenError
The error as key-value pairs.
Auto Trait Implementations§
impl RefUnwindSafe for AccessTokenError
impl Send for AccessTokenError
impl Sync for AccessTokenError
impl Unpin for AccessTokenError
impl UnwindSafe for AccessTokenError
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