impl ErrorKind {
pub(crate) fn as_str(&self) -> &'static str {
use ErrorKind::*;
+ // Strictly alphabetical, please. (Sadly rustfmt cannot do this yet.)
match *self {
AddrInUse => "address in use",
AddrNotAvailable => "address not available",
AlreadyExists => "entity already exists",
ArgumentListTooLong => "argument list too long",
BrokenPipe => "broken pipe",
- ResourceBusy => "resource busy",
ConnectionAborted => "connection aborted",
ConnectionRefused => "connection refused",
ConnectionReset => "connection reset",
Deadlock => "deadlock",
DirectoryNotEmpty => "directory not empty",
ExecutableFileBusy => "executable file busy",
+ FileTooLarge => "file too large",
FilenameTooLong => "filename too long",
+ FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
FilesystemQuotaExceeded => "filesystem quota exceeded",
- FileTooLarge => "file too large",
HostUnreachable => "host unreachable",
Interrupted => "operation interrupted",
InvalidData => "invalid data",
NetworkDown => "network down",
NetworkUnreachable => "network unreachable",
NotADirectory => "not a directory",
- StorageFull => "no storage space",
NotConnected => "not connected",
NotFound => "entity not found",
+ NotSeekable => "seek on unseekable file",
Other => "other error",
OutOfMemory => "out of memory",
PermissionDenied => "permission denied",
ReadOnlyFilesystem => "read-only filesystem or storage medium",
+ ResourceBusy => "resource busy",
StaleNetworkFileHandle => "stale network file handle",
- FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
- NotSeekable => "seek on unseekable file",
+ StorageFull => "no storage space",
TimedOut => "timed out",
TooManyLinks => "too many links",
Uncategorized => "uncategorized error",