#[non_exhaustive]pub enum OperatorConfirmError {
Declined,
Backoff {
retry_after_ms: Option<u64>,
},
PresenceUnavailable,
PresenceUnsupportedPlatform,
SummaryInvalid,
OperationInvalid,
NotPermitted,
Unsupported,
}Expand description
Failure to authorise a write through ModuleHandle::confirm_operator,
ModuleHandle::confirm_operation or ModuleHandle::confirm_enrollment.
Every variant requires the module to refuse the write, with one exception
described on OperatorConfirmError::PresenceUnsupportedPlatform.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Declined
Backoff
The daemon did not ask because a recent decline is still in effect.
Older daemons omit the remaining cooldown, so retry_after_ms may be absent.
The daemon could not get an answer from the operator: the prompt
failed or timed out, the connection dropped, or the reply was unknown
or malformed. A withdrawn prompt can instead come back as
OperatorConfirmError::Declined.
PresenceUnsupportedPlatform
The daemon has no operator prompt on this platform (today Linux), so
it showed none. It answered operator_presence_unavailable with
detail.reason unsupported_platform. Every other
operator_presence_unavailable reply stays
OperatorConfirmError::PresenceUnavailable.
Like every variant, this refuses the write by default. A module may
treat it differently only where its owner has ruled that, on a platform
without a prompt, a confirmation typed by a person in a local app
counts, and the product says so. It must never treat a
PresenceUnavailable that way.
SummaryInvalid
OperationInvalid
The operation name for ModuleHandle::confirm_operation was empty.
Operation names have no lexical grammar in Rust; membership in the
module’s manifest confirm_operations is decided by the daemon, which
prompts for any name it does not recognise. Only the empty string can
never name an operation, so it is refused before sending.
NotPermitted
Unsupported
Trait Implementations§
Source§impl Clone for OperatorConfirmError
impl Clone for OperatorConfirmError
impl Copy for OperatorConfirmError
Source§impl Debug for OperatorConfirmError
impl Debug for OperatorConfirmError
Source§impl Display for OperatorConfirmError
impl Display for OperatorConfirmError
impl Eq for OperatorConfirmError
Source§impl Error for OperatorConfirmError
impl Error for OperatorConfirmError
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()