#[non_exhaustive]pub enum Error {
NotFound,
NotSupported,
Busy,
ProtoState,
Cancelled,
RetryScan(RetryReason),
DataFull,
DataDuplicate,
DataNotFound,
Transport(String),
Protocol(String),
Other(String),
}Expand description
Errors surfaced by Backend/Device operations.
A flat translation vocabulary, not a source-chaining wrapper: a closed classification
mirroring libfprint’s FpDeviceError (FP_DEVICE_ERROR_*) plus a few transport/proto
buckets. Each backend maps its native failures (glib GError, USB errors) onto these
variants, and the daemon remaps them onto D-Bus names; the terminal form is a human-readable
string at that edge. retry-class variants correspond to fprintd’s *-retry-scan /
*-remove-and-retry status strings and mean “try again”, not “give up”.
The boundary variants (Transport/Protocol/Other) carry a String, not a dyn source:
the vocabulary is closed and value-semantic, so it collapses to strings at the D-Bus edge
rather than chaining a cause.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
No such device, or it went away.
NotSupported
Operation not supported by this device (missing crate::DeviceFeature).
Busy
Device is busy with another operation.
ProtoState
The device was in the wrong state for the request (e.g. not open).
Cancelled
Operation was cancelled by the caller.
RetryScan(RetryReason)
The user should present the finger again (bad scan, too fast, off-centre, …).
DataFull
On-device template storage is full.
DataDuplicate
A print with this finger is already enrolled (DUPLICATES_CHECK devices).
DataNotFound
The template does not exist on the device / in the gallery.
Transport(String)
Low-level transport failure (USB/SPI).
Protocol(String)
Protocol/parse failure talking to the sensor.
Other(String)
Anything a backend cannot map to the above.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()