pub enum ZeroFsError {
Show 16 variants
NotFound {
path: String,
},
PermissionDenied {
path: String,
},
NotPermitted {
path: String,
},
AlreadyExists {
path: String,
},
NotADirectory {
path: String,
},
IsADirectory {
path: String,
},
DirectoryNotEmpty {
path: String,
},
NameTooLong {
name: String,
},
InvalidArgument {
message: String,
},
TooManySymlinks {
path: String,
},
Closed,
ConnectFailed {
message: String,
},
NotLeader {
path: String,
},
Stale {
path: String,
},
Io {
errno: i32,
path: String,
message: String,
},
Protocol {
message: String,
},
}Expand description
Flat, exhaustive error type. New variants require matching updates in
zerofs-ffi.
path and name payloads are lossy display strings and are not inputs.
Unclassified server errnos retain their numeric value in ZeroFsError::Io.
Variants§
NotFound
No entry at the path (ENOENT).
PermissionDenied
Access denied by permission bits (EACCES).
NotPermitted
EPERM, distinct from EACCES: the operation requires ownership or privilege (e.g. chown by a non-owner).
AlreadyExists
The target already exists (EEXIST).
NotADirectory
A path component is not a directory (ENOTDIR).
IsADirectory
The target is a directory where a non-directory was required (EISDIR).
DirectoryNotEmpty
A directory removal found the directory non-empty (ENOTEMPTY).
NameTooLong
Name exceeds 255 bytes.
InvalidArgument
Bad input detected client-side (e.g. .. component, conflicting open
options) or EINVAL from the server.
TooManySymlinks
Symlink resolution exceeded the 40-hop cap (cycle or pathological chain).
Closed
Handle or client used after close().
ConnectFailed
Initial connection, negotiation, or attach failure.
NotLeader
The target is no longer the HA leader (P9_ENOTLEADER).
Stale
Stale handle (ESTALE). From sync methods, prior acknowledged writes may
be non-durable and require replacement. Other operations require reopen.
Io
Any other server errno, preserved verbatim.
Fields
Protocol
Wire-level failure: codec error, unexpected reply type, failed negotiation.
Implementations§
Trait Implementations§
Source§impl Clone for ZeroFsError
impl Clone for ZeroFsError
Source§fn clone(&self) -> ZeroFsError
fn clone(&self) -> ZeroFsError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ZeroFsError
impl Debug for ZeroFsError
Source§impl Display for ZeroFsError
impl Display for ZeroFsError
Source§impl Error for ZeroFsError
impl Error for ZeroFsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ZeroFsError> for Error
Lossless conversion for interop with std/tokio I/O: the errno round-trips
through from_raw_os_error (so ErrorKind is set), and the original
ZeroFsError is preserved as the source (recoverable via downcast).
impl From<ZeroFsError> for Error
Lossless conversion for interop with std/tokio I/O: the errno round-trips
through from_raw_os_error (so ErrorKind is set), and the original
ZeroFsError is preserved as the source (recoverable via downcast).