#[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.
Trait Implementations§
impl Copy for ErrorKind
impl Eq 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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Other
: 0 bytesNotFound
: 0 bytesPermissionDenied
: 0 bytesConnectionRefused
: 0 bytesConnectionReset
: 0 bytesConnectionAborted
: 0 bytesNotConnected
: 0 bytesAddrInUse
: 0 bytesAddrNotAvailable
: 0 bytesBrokenPipe
: 0 bytesAlreadyExists
: 0 bytesInvalidInput
: 0 bytesInvalidData
: 0 bytesTimedOut
: 0 bytesInterrupted
: 0 bytesUnsupported
: 0 bytesOutOfMemory
: 0 bytesWriteZero
: 0 bytes