pub enum MountError {
NotFound(String),
Stale(String),
NotADirectory(String),
UnknownThread(String),
ReadOnly,
AlreadyExists(String),
IsADirectory(String),
NotEmpty(String),
InvalidArgument(String),
FileTooLarge(String),
SessionInit(String),
Store(HeddleError),
}Expand description
Errors surfaced by the content-addressed mount core.
Variants§
NotFound(String)
The requested path or node does not exist in the current state.
Stale(String)
The node referenced by the caller is no longer valid (stale inode, invalidated cache, etc).
NotADirectory(String)
A path component traversed something that wasn’t a directory.
UnknownThread(String)
The thread name does not resolve to a current state.
ReadOnly
Read-only filesystem (used while overlay-write is stubbed).
AlreadyExists(String)
An entry with this name already exists (e.g. O_CREAT|O_EXCL
against an existing file, or mkdir against an existing dir).
Maps to EEXIST so userspace tooling that exercises atomic
“create-or-skip” semantics (cargo’s lockfile lease, git’s
objects/<n>/<n>.tmp placement) sees the conventional errno.
IsADirectory(String)
Tried to operate on a file as if it were a directory
(e.g. unlink against a path that resolves to a directory).
Maps to EISDIR.
NotEmpty(String)
Tried to rmdir a directory that still has visible children
(across the captured tree + pending overlay). Maps to
ENOTEMPTY.
InvalidArgument(String)
Invalid argument from the caller (e.g. a name containing
/, \0, or ./..). Maps to EINVAL.
FileTooLarge(String)
A write or truncate would grow the hot buffer past the mount’s
configured maximum file size. Maps to EFBIG.
SessionInit(String)
The platform shell failed to construct its mount session
(e.g. the Swift FSKit shim returned a null session handle).
Maps to EIO: the mount never came up, nothing to retry
at the filesystem layer.
Store(HeddleError)
Errors bubbling up from the underlying object store / repo.
Implementations§
Source§impl MountError
impl MountError
Sourcepub fn to_errno(&self) -> i32
pub fn to_errno(&self) -> i32
Translate this error into a libc errno suitable for handing back to FUSE. Only the platform shell uses this — keeping it here means platform code stays one-liners.
ESTALE is POSIX-only; on Windows libc doesn’t define it,
so the Windows build uses the POSIX value (116) verbatim.
The ProjFS shell translates this back into a Win32
ERROR_FILE_INVALID further downstream — no caller looks at
the raw integer except as a match discriminant.
Trait Implementations§
Source§impl Debug for MountError
impl Debug for MountError
Source§impl Display for MountError
impl Display for MountError
Source§impl Error for MountError
impl Error for MountError
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()