pub struct DeviceOpError {
pub op: String,
pub device: String,
/* private fields */
}Expand description
A failed device operation, with enough context to pinpoint it from a log
line alone: which operation (write, read, poll, ioctl CA_RESET, …), which device (the /dev/dvb/adapterN/... path, or
the fd role for a from_file wrapper) and the errno. A bare
Invalid argument (os error 22) from Driver::pump (seen on a DD CXD2099
during init) names none of those, and the same errno means different
things per operation: the kernel’s dvb_ca_en50221 returns EINVAL from
write while the slot is not yet RUNNING, from read when the buffer is
smaller than the pending frame, and from CA_GET_SLOT_INFO for a slot it
does not have.
It is carried as the payload of an io::Error of the same
io::ErrorKind as the original, so kind()-based handling is
unchanged; the errno stays reachable through errno /
DeviceOpError::errno_of (a wrapped error no longer answers
raw_os_error() itself).
Fields§
§op: StringThe operation that failed, e.g. "write (17 bytes)".
device: StringThe device, e.g. "/dev/dvb/adapter3/ca0".
Implementations§
Trait Implementations§
Source§impl Debug for DeviceOpError
impl Debug for DeviceOpError
Source§impl Display for DeviceOpError
impl Display for DeviceOpError
Source§impl Error for DeviceOpError
impl Error for DeviceOpError
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()