#[non_exhaustive]pub enum ErrorKind {
Show 13 variants
NotFound,
PermissionDenied,
AlreadyExists,
WouldBlock,
InvalidInput,
InvalidData,
TimedOut,
WriteZero,
Interrupted,
Unsupported,
UnexpectedEof,
OutOfMemory,
Other,
}
Expand description
An enum providing a rough classification of errors.
The variants of this type partly resemble those of
std::io::Error
, because these are the most common sources of
error that the crate concerns itself with.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
An entity was not found, often a file.
PermissionDenied
The operation lacked the necessary privileges to complete.
AlreadyExists
An entity already exists, often a file.
WouldBlock
The operation needs to block to complete, but the blocking operation was requested to not occur.
InvalidInput
A parameter was incorrect.
InvalidData
Data not valid for the operation were encountered.
TimedOut
The I/O operation’s timeout expired, causing it to be canceled.
WriteZero
An error returned when an operation could not be completed
because a call to write
returned [Ok(0)
].
Interrupted
This operation was interrupted.
Interrupted operations can typically be retried.
Unsupported
This operation is unsupported on this platform.
UnexpectedEof
An error returned when an operation could not be completed because an “end of file” was reached prematurely.
OutOfMemory
An operation could not be completed, because it failed to allocate enough memory.
Other
A custom error that does not fall under any other I/O error kind.
Trait Implementations§
impl Copy for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)