pub enum Error {
ContextInit(String),
InvalidArgument(String),
Ioctl(u8, Option<Box<DeviceInfo>>, Option<Box<DeviceInfo>>, Box<Error>),
IoctlResultTooLarge,
MetadataIo(PathBuf, String),
GeneralIo(String),
UdevSync(String),
}Expand description
Internal error for low-level devicemapper operations
Variants§
ContextInit(String)
An error returned on failure to create a devicemapper context
InvalidArgument(String)
This is a generic error that can be returned when a method receives an invalid argument. Ideally, the argument should be invalid in itself, i.e., it should not be made invalid by some part of the program state or the environment.
Ioctl(u8, Option<Box<DeviceInfo>>, Option<Box<DeviceInfo>>, Box<Error>)
An error returned exclusively by DM methods. This error is initiated in DM::do_ioctl and returned by numerous wrapper methods.
IoctlResultTooLarge
An error returned when the response exceeds the maximum possible size of the ioctl buffer.
MetadataIo(PathBuf, String)
An error returned on failure to get metadata for a device
GeneralIo(String)
An error returned on general IO failure
UdevSync(String)
An error synchronizing with udev
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§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 Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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