Enum DeviceError
#[non_exhaustive]pub enum DeviceError {
List(Errno),
Attribute {
path: PathBuf,
source: Errno,
},
AttributeValue {
path: PathBuf,
value: Box<str>,
},
VolumeName {
path: PathBuf,
source: VolumeNameError,
},
Open {
path: PathBuf,
source: Errno,
},
OutOfRange {
value: u64,
},
Attach {
mtd_number: u32,
source: Errno,
},
AttachedNumber {
mtd_number: u32,
number: i32,
},
Detach {
number: u32,
source: Errno,
},
Image(Error),
ImageTooShort {
written: u64,
size: u64,
},
Update(Errno),
}Expand description
Failure of a UBI device or volume operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
List(Errno)
Listing the UBI devices in sysfs failed.
Attribute
Reading a sysfs attribute failed.
AttributeValue
A sysfs attribute contains a value that can’t be parsed.
VolumeName
A sysfs attribute contains an invalid volume name.
Open
Opening a device file failed.
OutOfRange
A number doesn’t fit into the signed integer that the kernel takes.
Attach
Attaching an MTD device to UBI failed.
AttachedNumber
The kernel returned a negative UBI device number for an attach.
Fields
Detach
Detaching a UBI device failed.
Image(Error)
Reading the image failed.
ImageTooShort
The image ended before the announced size.
Update(Errno)
Updating the UBI volume failed.
Implementations§
Trait Implementations§
§impl Debug for DeviceError
impl Debug for DeviceError
§impl Display for DeviceError
impl Display for DeviceError
§impl Error for DeviceError
impl Error for DeviceError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceError
impl !UnwindSafe for DeviceError
impl Freeze for DeviceError
impl Send for DeviceError
impl Sync for DeviceError
impl Unpin for DeviceError
impl UnsafeUnpin for DeviceError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more