#[non_exhaustive]pub enum NsErrorKind {
Show 17 variants
InvalidPath(PathReason),
InvalidInput(InputReason),
NotFound,
AlreadyExists,
NotADirectory,
IsADirectory,
NotEmpty,
PermissionDenied,
NotRegular,
HardLinked,
Escapes,
CaseCollision,
TooLarge,
VersionMismatch,
Unsupported(Feature),
CrossMount,
Io(ErrorKind),
}Expand description
What went wrong, as a value a caller can match on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidPath(PathReason)
The path violates the portable name grammar; the reason says which rule.
InvalidInput(InputReason)
An argument (not the path) is wrong, e.g. data given to an operation that takes none, or if_version given to a
create. The text says which.
NotFound
Nothing is at the path.
AlreadyExists
Something is already at the path (or, for a rename, at the destination).
NotADirectory
A directory was needed and a file was found (or a path component is a file).
IsADirectory
A file was needed and a directory was found.
NotEmpty
A directory could not be removed because it still has entries.
PermissionDenied
The mount is read-only, the OS refused, or the path is not under a writable mount.
NotRegular
The entry is not a regular file or a directory (a device, FIFO or socket). The namespace never opens one.
HardLinked
The file has more than one hard link, so writing it could change another name’s contents. Refused.
Escapes
A symbolic link or reparse point was met. The namespace never follows one; mount the target as its own root if it is meant to be reachable.
CaseCollision
The name differs only by case from an existing sibling. Refused on every backend: the grammar is portable.
TooLarge
A read was larger than the caller’s max. Nothing is truncated.
VersionMismatch
if_version did not match the current version: someone else changed the entry. Re-read and retry.
Unsupported(Feature)
The backend declared this capability false in its Caps.
CrossMount
A rename between two mounts. Do a copy then a remove; it cannot be atomic and the Kit does not pretend it is.
Io(ErrorKind)
Any other I/O failure, reduced to its kind. The detail is deliberately dropped (see the module docs).
Trait Implementations§
Source§impl Clone for NsErrorKind
impl Clone for NsErrorKind
impl Copy for NsErrorKind
Source§impl Debug for NsErrorKind
impl Debug for NsErrorKind
Source§impl Display for NsErrorKind
impl Display for NsErrorKind
impl Eq for NsErrorKind
Source§impl Hash for NsErrorKind
impl Hash for NsErrorKind
Source§impl PartialEq for NsErrorKind
impl PartialEq for NsErrorKind
impl StructuralPartialEq for NsErrorKind
Auto Trait Implementations§
impl Forget for NsErrorKind
impl Freeze for NsErrorKind
impl Move for NsErrorKind
impl RefUnwindSafe for NsErrorKind
impl Send for NsErrorKind
impl Sync for NsErrorKind
impl Unpin for NsErrorKind
impl UnsafeUnpin for NsErrorKind
impl UnwindSafe for NsErrorKind
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more