Skip to main content

FezError

Enum FezError 

Source
pub enum FezError {
Show 13 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>, }, Aborted, AccessDenied { remediation: String, },
}
Expand description

Every error fez can surface to the caller.

Variants§

§

Spawn

A child process (the bridge) could not be spawned.

Fields

§program: String

Program that failed to launch.

§source: Error

Underlying OS error.

§

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.

Fields

§name: String

D-Bus error name.

§message: String

D-Bus error message.

§

NotFound(String)

The requested resource (e.g. a unit) does not exist.

§

Protected

A protected unit was targeted without --force.

Fields

§unit: String

The protected unit that was refused.

§

DependencyMissing

A required target dependency (e.g. dnf5daemon) is absent or not activatable.

Fields

§component: String

Human-facing name of the missing component (e.g. dnf5daemon).

§dbus_name: String

The D-Bus name that failed to activate (e.g. org.rpm.dnf.v0).

§remediation: String

Actionable guidance to install/enable the dependency and retry.

§

DangerousTransaction

A resolved transaction was refused by removal guardrails without --force.

Fields

§reason: String

Why the transaction was refused (protected package or cascade size).

§removed: Vec<String>

Package names the resolved plan would remove.

§

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).

Fields

§remediation: String

Actionable guidance to enable privilege escalation and retry.

Implementations§

Source§

impl FezError

Source

pub fn code(&self) -> &'static str

Stable machine-readable error code for this error.

Source

pub fn exit_code(&self) -> i32

Process exit code to use when this error is fatal.

Trait Implementations§

Source§

impl Debug for FezError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FezError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for FezError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.