#[non_exhaustive]pub enum CpdbError {
}Expand description
Errors that originate from the cpdb-rs bindings.
This type is #[non_exhaustive] — match arms must include a wildcard
so adding variants in future minor releases is not a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NullPointer
A C function returned NULL where a valid pointer was required.
InvalidPrinter
A printer object pointer is invalid or has been released.
NotFound(String)
A lookup (printer, option, media, translation, …) returned no result.
PrinterError(String)
A printer-side operation failed (set default, accept jobs, …).
JobFailed(String)
A print job submission failed.
BackendError(String)
A backend-side operation failed.
FrontendError(String)
A frontend-side operation failed (D-Bus, lifecycle, …).
OptionError(String)
A printer option could not be parsed or applied.
Utf8Error(Utf8Error)
A byte sequence returned by the backend (cpdb-libs C string or a D-Bus payload) contained invalid UTF-8.
NulError(NulError)
A Rust string contained an interior NUL byte.
IoError(Error)
An I/O error bubbled up from std::io.
InvalidStatus(i32)
An unexpected status code was returned.
Unsupported
The requested operation is not supported.
DbusError(String)
A D-Bus protocol error occurred. The inner string is a
human-readable rendering (typically starts with the D-Bus error
name, e.g. "org.freedesktop.DBus.Error.UnknownMethod: ...").
The variant is exposed even when the zbus-backend feature is
disabled so downstream match arms remain valid across every
feature combination.
FdoError(String)
A D-Bus FDO (freedesktop.org) standard error occurred. See
DbusError for the rationale on the unconditional
String payload.
Trait Implementations§
Source§impl Error for CpdbError
impl Error for CpdbError
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<Error> for CpdbError
Available on crate feature zbus-backend only.Converts a zbus::Error into a CpdbError::DbusError by rendering it
with Display. Only compiled when the zbus-backend feature is enabled.
impl From<Error> for CpdbError
zbus-backend only.Converts a zbus::Error into a CpdbError::DbusError by rendering it
with Display. Only compiled when the zbus-backend feature is enabled.
Source§impl From<Error> for CpdbError
Available on crate feature zbus-backend only.Converts a zbus::fdo::Error into a CpdbError::FdoError by rendering
it with Display. Only compiled when the zbus-backend feature is
enabled.
impl From<Error> for CpdbError
zbus-backend only.Converts a zbus::fdo::Error into a CpdbError::FdoError by rendering
it with Display. Only compiled when the zbus-backend feature is
enabled.