Enum embedded_io::ErrorKind
source · #[non_exhaustive]pub enum ErrorKind {
Show 18 variants
Other,
NotFound,
PermissionDenied,
ConnectionRefused,
ConnectionReset,
ConnectionAborted,
NotConnected,
AddrInUse,
AddrNotAvailable,
BrokenPipe,
AlreadyExists,
InvalidInput,
InvalidData,
TimedOut,
Interrupted,
Unsupported,
OutOfMemory,
WriteZero,
}
Expand description
Possible kinds of errors.
This list is intended to grow over time and it is not recommended to
exhaustively match against it. In application code, use match
for the ErrorKind
values you are expecting; use _
to match “all other errors”.
This is the embedded-io
equivalent of [std::io::ErrorKind
], except with the following changes:
WouldBlock
is removed, sinceembedded-io
traits are always blocking. See the crate-level documentation for details.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Other
Unspecified error kind.
NotFound
An entity was not found, often a file.
PermissionDenied
The operation lacked the necessary privileges to complete.
ConnectionRefused
The connection was refused by the remote server.
ConnectionReset
The connection was reset by the remote server.
ConnectionAborted
The connection was aborted (terminated) by the remote server.
NotConnected
The network operation failed because it was not connected yet.
AddrInUse
A socket address could not be bound because the address is already in use elsewhere.
AddrNotAvailable
A nonexistent interface was requested or the requested address was not local.
BrokenPipe
The operation failed because a pipe was closed.
AlreadyExists
An entity already exists, often a file.
InvalidInput
A parameter was incorrect.
InvalidData
Data not valid for the operation were encountered.
Unlike InvalidInput
, this typically means that the operation
parameters were valid, however the error was caused by malformed
input data.
For example, a function that reads a file into a string will error with
InvalidData
if the file’s contents are not valid UTF-8.
TimedOut
The I/O operation’s timeout expired, causing it to be canceled.
Interrupted
This operation was interrupted.
Interrupted operations can typically be retried.
Unsupported
This operation is unsupported on this platform.
This means that the operation can never succeed.
OutOfMemory
An operation could not be completed, because it failed to allocate enough memory.
WriteZero
An attempted write could not write any data.