pub enum DeviceAuthorizationOAuthError {
OAuth(OAuthError),
NoDeviceAuthorizationEndpoint,
DeviceAuthorization(BasicRequestTokenError<HttpClientError<Error>>),
RequestToken(RequestTokenError<HttpClientError<Error>, DeviceCodeErrorResponse>),
}Expand description
Error type describing failures in the interaction between the device attempting to log in and the OAuth 2.0 authorization server, when using the device authorization grant defined in RFC 8628 and specified in the Matrix specification.
Variants§
OAuth(OAuthError)
A generic OAuth 2.0 error happened while we were attempting to register the device with the OAuth 2.0 authorization server.
NoDeviceAuthorizationEndpoint
The OAuth 2.0 server doesn’t support the device authorization grant.
DeviceAuthorization(BasicRequestTokenError<HttpClientError<Error>>)
An error happened while we attempted to request a device authorization from the OAuth 2.0 authorization server.
RequestToken(RequestTokenError<HttpClientError<Error>, DeviceCodeErrorResponse>)
An error happened while waiting for the access token to be issued and sent to us by the OAuth 2.0 authorization server.
Implementations§
Source§impl DeviceAuthorizationOAuthError
impl DeviceAuthorizationOAuthError
Sourcepub fn as_request_token_error(&self) -> Option<&DeviceCodeErrorResponseType>
pub fn as_request_token_error(&self) -> Option<&DeviceCodeErrorResponseType>
If the DeviceAuthorizationOAuthError is of the
DeviceCodeErrorResponseType error variant, return it.
Trait Implementations§
Source§impl Error for DeviceAuthorizationOAuthError
impl Error for DeviceAuthorizationOAuthError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<DeviceAuthorizationOAuthError> for DeviceCodeLoginError
impl From<DeviceAuthorizationOAuthError> for DeviceCodeLoginError
Source§fn from(error: DeviceAuthorizationOAuthError) -> Self
fn from(error: DeviceAuthorizationOAuthError) -> Self
Source§impl From<DeviceAuthorizationOAuthError> for QRCodeLoginError
Available on crate feature e2e-encryption only.
impl From<DeviceAuthorizationOAuthError> for QRCodeLoginError
e2e-encryption only.Source§fn from(source: DeviceAuthorizationOAuthError) -> Self
fn from(source: DeviceAuthorizationOAuthError) -> Self
Source§impl From<OAuthError> for DeviceAuthorizationOAuthError
impl From<OAuthError> for DeviceAuthorizationOAuthError
Source§fn from(source: OAuthError) -> Self
fn from(source: OAuthError) -> Self
Source§impl From<RequestTokenError<HttpClientError<Error>, StandardErrorResponse<BasicErrorResponseType>>> for DeviceAuthorizationOAuthError
impl From<RequestTokenError<HttpClientError<Error>, StandardErrorResponse<BasicErrorResponseType>>> for DeviceAuthorizationOAuthError
Source§fn from(source: BasicRequestTokenError<HttpClientError<Error>>) -> Self
fn from(source: BasicRequestTokenError<HttpClientError<Error>>) -> Self
Source§impl From<RequestTokenError<HttpClientError<Error>, StandardErrorResponse<DeviceCodeErrorResponseType>>> for DeviceAuthorizationOAuthError
impl From<RequestTokenError<HttpClientError<Error>, StandardErrorResponse<DeviceCodeErrorResponseType>>> for DeviceAuthorizationOAuthError
Source§fn from(
source: RequestTokenError<HttpClientError<Error>, DeviceCodeErrorResponse>,
) -> Self
fn from( source: RequestTokenError<HttpClientError<Error>, DeviceCodeErrorResponse>, ) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceAuthorizationOAuthError
impl !UnwindSafe for DeviceAuthorizationOAuthError
impl Freeze for DeviceAuthorizationOAuthError
impl Send for DeviceAuthorizationOAuthError
impl Sync for DeviceAuthorizationOAuthError
impl Unpin for DeviceAuthorizationOAuthError
impl UnsafeUnpin for DeviceAuthorizationOAuthError
Blanket Implementations§
impl<T> AsyncTraitDeps for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more