#[non_exhaustive]#[repr(i32)]pub enum Error {
Show 22 variants
AddrInUse,
AlreadyExists,
BadAddress,
BadState,
ConnectionRefused,
ConnectionReset,
DirectoryNotEmpty,
InvalidData,
InvalidInput,
Io,
IsADirectory,
NoMemory,
NotADirectory,
NotConnected,
NotFound,
PermissionDenied,
ResourceBusy,
StorageFull,
UnexpectedEof,
Unsupported,
WouldBlock,
WriteZero,
}
Expand description
The error type used by ArceOS.
Similar to std::io::ErrorKind
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AddrInUse
A socket address could not be bound because the address is already in use elsewhere.
AlreadyExists
An entity already exists, often a file.
BadAddress
Bad address.
BadState
Bad internal state.
ConnectionRefused
The connection was refused by the remote server,
ConnectionReset
The connection was reset by the remote server.
DirectoryNotEmpty
A non-empty directory was specified where an empty directory was expected.
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.
InvalidInput
Invalid parameter/argument.
Io
Input/output error.
IsADirectory
The filesystem object is, unexpectedly, a directory.
NoMemory
Not enough space/cannot allocate memory.
NotADirectory
A filesystem object is, unexpectedly, not a directory.
NotConnected
The network operation failed because it was not connected yet.
NotFound
The requested entity is not found.
PermissionDenied
The operation lacked the necessary privileges to complete.
ResourceBusy
Device or resource is busy.
StorageFull
The underlying storage (typically, a filesystem) is full.
UnexpectedEof
An error returned when an operation could not be completed because an “end of file” was reached prematurely.
Unsupported
This operation is unsupported or unimplemented.
WouldBlock
The operation needs to block to complete, but the blocking operation was requested to not occur.
WriteZero
An error returned when an operation could not be completed because a
call to write()
returned Ok(0)
.