#[non_exhaustive]pub enum DeviceApprovalError {
UnknownUserCode,
Expired,
NotPending,
RateLimited,
Storage(StorageError),
}Expand description
Rejections for the host-driven verification-UI actions (AuthorizationServer::approve_device
/ AuthorizationServer::deny_device). These are NOT wire errors: the RFC leaves the
verification interaction to the implementation, and the host renders these however its UI
wants.
#[non_exhaustive], for the reason lib.rs gives for re-exporting it at all: a host’s
verification UI is expected to MATCH on this, so a later release that has a new way to refuse an
entered code must be able to say so without that being a semver-major change for every host.
Every other host-facing failure enum in this crate carries the same attribute
(crate::registration::RegistrationFailure, crate::events::ClientAuthFailure,
crate::consent::AuthenticationRequirement); this one was the exception, and there was no argument
for the exception.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownUserCode
No live grant matches the entered code.
Expired
The grant existed but its lifetime has passed.
NotPending
The grant was already approved or denied.
RateLimited
The host’s own crate::events::RateLimiter refused the attempt before the code was
looked up at all. RFC 8628 section 5.1 makes throttling user-code entry a REQUIREMENT of
the deployment, not an optimisation, so this is a first-class answer and not an error.
Storage(StorageError)
The storage seam failed.
Trait Implementations§
Source§impl Clone for DeviceApprovalError
impl Clone for DeviceApprovalError
Source§fn clone(&self) -> DeviceApprovalError
fn clone(&self) -> DeviceApprovalError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceApprovalError
impl Debug for DeviceApprovalError
Source§impl Display for DeviceApprovalError
impl Display for DeviceApprovalError
impl Eq for DeviceApprovalError
Source§impl Error for DeviceApprovalError
impl Error for DeviceApprovalError
1.30.0 · 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()