pub struct OAuthError {
pub error: OAuthErrorCode,
pub error_description: Option<String>,
}Expand description
The OAuth endpoints’ error body (RFC 6749 § 5.2, reused by RFC 7591 § 3.2.2).
Not the platform’s {"error": "<message>"} envelope: error is a
registered code clients parse, and the prose belongs in
error_description.
Fields§
§error: OAuthErrorCode§error_description: Option<String>Implementations§
Source§impl OAuthError
impl OAuthError
pub fn new(error: OAuthErrorCode, description: impl Into<String>) -> Self
Sourcepub fn code(error: OAuthErrorCode) -> Self
pub fn code(error: OAuthErrorCode) -> Self
An error with only its code
Trait Implementations§
Source§impl Clone for OAuthError
impl Clone for OAuthError
Source§impl Debug for OAuthError
impl Debug for OAuthError
Source§impl<'de> Deserialize<'de> for OAuthError
impl<'de> Deserialize<'de> for OAuthError
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
impl Eq for OAuthError
Source§impl PartialEq for OAuthError
impl PartialEq for OAuthError
Source§impl Serialize for OAuthError
impl Serialize for OAuthError
impl StructuralPartialEq for OAuthError
Auto Trait Implementations§
impl Freeze for OAuthError
impl RefUnwindSafe for OAuthError
impl Send for OAuthError
impl Sync for OAuthError
impl Unpin for OAuthError
impl UnsafeUnpin for OAuthError
impl UnwindSafe for OAuthError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.