Enum DeviceError
#[non_exhaustive]pub enum DeviceError {
Open {
path: PathBuf,
source: Error,
},
Attach {
mtd: u32,
source: Error,
},
Detach {
ubi: u32,
source: Error,
},
DeviceTimeout {
path: PathBuf,
},
Attribute {
path: PathBuf,
source: Error,
},
AttributeValue {
path: PathBuf,
value: String,
},
VolumeTooSmall {
size: u64,
reserved: u64,
},
Image(Error),
ImageTooShort {
written: u64,
size: u64,
},
Update(Error),
}Available on crate feature
linux and (Android or Linux) only.Expand description
Failure of a UBI device 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.
Open
Opening a device file failed.
Attach
Attaching an MTD device to UBI failed.
Detach
Detaching a UBI device failed.
DeviceTimeout
A device file didn’t appear in time.
Attribute
Reading a sysfs attribute failed.
AttributeValue
A sysfs attribute has an unexpected value.
VolumeTooSmall
An image exceeds the reserved space of the UBI volume.
Image(Error)
Reading the image failed.
ImageTooShort
The image ended before the announced size.
Update(Error)
Writing the image to the UBI volume failed.
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