#[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.