#[non_exhaustive]pub enum TreeError {
Show 13 variants
RegistrySource {
path: String,
source: Box<LoadError>,
},
GitSource {
path: String,
source: Box<LoadError>,
},
BackendAuthority {
path: String,
authority: SourceAuthorityId,
},
WrongAuthority {
path: String,
authority: SourceAuthorityId,
},
NotFound {
path: String,
},
OutsideRoot {
path: String,
},
NotRegular {
path: String,
},
SymlinkLoop {
path: String,
},
TooLarge {
path: String,
limit: u64,
},
NotUtf8 {
path: String,
},
NonUtf8Name {
path: String,
name: String,
},
DuplicatePath {
path: String,
},
Io {
path: String,
source: Error,
},
}Expand description
Why a Tree call failed.
Every variant names the path it concerns. Only TreeError::NotFound
means that nothing is there; every other variant is a refusal or a failure
and must never be read as absence.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RegistrySource
A registry archive refused source, storage or work evidence.
Fields
GitSource
A committed Git host Tree refused source, storage or work evidence.
Fields
BackendAuthority
A source mount received an already-scoped identity from its backend.
Fields
The backend identity’s unexpected authority.
WrongAuthority
This tree does not provide the path’s selected source authority.
NotFound
Nothing exists at the path.
OutsideRoot
The path leads outside the tree root: by an absolute or .. input, a
symlink, or a .. after a directory symlink.
NotRegular
The path is not a regular file where one is needed, or not a real directory where one is needed (a FIFO, a device, a directory symlink).
SymlinkLoop
Resolving the path ran into a symlink loop.
TooLarge
The file holds more bytes than the caller allowed.
NotUtf8
The file is not valid UTF-8.
NonUtf8Name
A directory entry has a name that is not valid UTF-8.
Fields
DuplicatePath
Two keys of a MemoryTree name one path once
normalised.
Io
The operating system failed the operation for another reason.
Implementations§
Trait Implementations§
Source§impl Error for TreeError
impl Error for TreeError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for TreeError
impl !UnwindSafe for TreeError
impl Forget for TreeError
impl Freeze for TreeError
impl Move for TreeError
impl Send for TreeError
impl Sync for TreeError
impl Unpin for TreeError
impl UnsafeUnpin for TreeError
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> ErrorExt for T
impl<T> ErrorExt for T
Source§fn raise_typed(self) -> Exn<Self>where
Self: Sized,
fn raise_typed(self) -> Exn<Self>where
Self: Sized,
Self even when it is already an Error.Source§fn and_raise_typed<T>(self, context: T) -> Exn<T>
fn and_raise_typed<T>(self, context: T) -> Exn<T>
Self::and_raise(), retaining the context’s type in an exception.Source§fn raise_erased(self) -> Exnwhere
Self: Sized,
fn raise_erased(self) -> Exnwhere
Self: Sized,
crate::Error values reuse their existing frame and caller location.impl<T> EvidenceLease for T
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