pub enum Error {
CopyFailed(Errno),
PartiallyCopied(usize),
IncompleteMsg {
read: usize,
expected: usize,
},
SystemError(Error),
ReadEof,
UnrecognizedEvent(u8),
UnsupportedIoctls(IoctlFlags),
ZeropageFailed(Errno),
OpenDevUserfaultfd(Error),
}Expand description
Errors for this crate.
Several of these errors contain an underlying Errno value; see
userfaultfd(2) and
ioctl_userfaultfd(2) for more
details on how to interpret these errors.
Variants§
CopyFailed(Errno)
Copy ioctl failure with errno value.
PartiallyCopied(usize)
Copy ioctl failure with copied length.
IncompleteMsg
Failure to read a full uffd_msg struct from the underlying file descriptor.
SystemError(Error)
Generic system error.
ReadEof
End-of-file was read from the underlying file descriptor.
UnrecognizedEvent(u8)
An unrecognized event code was found in a uffd_msg struct.
UnsupportedIoctls(IoctlFlags)
Requested ioctls were not available when initializing the API.
ZeropageFailed(Errno)
Zeropage ioctl failure with errno value.
OpenDevUserfaultfd(Error)
Could not open /dev/userfaultfd even though it exists
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 !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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