pub enum FezError {
Show 15 variants
Spawn {
program: String,
source: Error,
},
Io(Error),
Decode(Error),
Timeout,
BridgeClosed,
Problem(String),
Dbus {
name: String,
message: String,
},
NotFound(String),
Protected {
unit: String,
},
DependencyMissing {
component: String,
dbus_name: String,
remediation: String,
},
DangerousTransaction {
reason: String,
removed: Vec<String>,
},
Usage(String),
Aborted,
AccessDenied {
remediation: String,
},
UnsupportedApi(String),
}Expand description
Every error fez can surface to the caller.
Variants§
Spawn
A child process (the bridge) could not be spawned.
Io(Error)
A generic I/O failure.
Decode(Error)
A protocol message could not be decoded.
Timeout
The bridge did not respond before the deadline.
BridgeClosed
The bridge connection was closed unexpectedly.
Problem(String)
The bridge reported a problem; the string is a problem kind.
Dbus
A D-Bus call returned an error.
NotFound(String)
The requested resource (e.g. a unit) does not exist.
Protected
A protected unit was targeted without --force.
DependencyMissing
A required target dependency (e.g. dnf5daemon) is absent or not activatable.
Fields
DangerousTransaction
A resolved transaction was refused by removal guardrails without --force.
Fields
Usage(String)
A CLI usage error (clap parse failure: missing/invalid argument or
unknown flag) surfaced as a fez/v1 envelope because --json was
requested. The plain-text path keeps clap’s own rendering.
Aborted
The user declined a confirmation prompt.
AccessDenied
Privilege escalation to root failed (the bridge could not become root, e.g. sudo requires a password fez does not supply).
UnsupportedApi(String)
The managed subsystem is present but does not expose a D-Bus method fez
needs (the call returned UnknownMethod), e.g. an older firewalld
without getMasquerade. Distinct from a missing dependency: the service
is reachable but its API surface is too old.
Implementations§
Source§impl FezError
impl FezError
Sourcepub fn detail(&self) -> Option<Value>
pub fn detail(&self) -> Option<Value>
Structured detail for the fez/v1 error envelope.
Returns the machine-readable payload for the error variants that carry
one (DependencyMissing, DangerousTransaction, UnsupportedApi);
every other variant has no structured detail and yields None.
Capabilities call this when rendering an error envelope so the mapping
lives in one place.
Trait Implementations§
Source§impl Error for FezError
impl Error for FezError
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()