#[non_exhaustive]pub enum Error {
Show 24 variants
Io {
operation: &'static str,
path: PathBuf,
source: Error,
},
Stream {
operation: &'static str,
source: Error,
},
InvalidData {
detail: String,
},
InvalidBase32,
InvalidHex,
InvalidRoot {
value: String,
},
InvalidName {
name: String,
reason: &'static str,
},
HashMismatch {
what: &'static str,
},
SizeMismatch {
what: &'static str,
expected: u64,
actual: u64,
},
TotalsMismatch {
field: &'static str,
recorded: u64,
counted: u64,
},
IntakeFailed,
NotWanted {
what: &'static str,
},
Corrupt {
what: &'static str,
hash: Hash,
},
Missing {
what: &'static str,
hash: Hash,
},
TooDeep {
limit: usize,
},
UnwritableName {
name: String,
reason: &'static str,
},
UnsupportedEntry {
path: PathBuf,
what: &'static str,
},
NonUtf8FileName {
path: PathBuf,
},
Peer {
detail: String,
},
LimitExceeded {
what: &'static str,
limit: u64,
requested: u64,
},
AllocationFailed {
resource: &'static str,
requested: u64,
},
SystemTimeBeforeUnixEpoch,
SizeOverflow {
field: &'static str,
},
Invariant {
detail: &'static str,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
The file system refused something.
Stream
Reading from a stream or writing to one failed.
InvalidData
Bytes that are not a well-formed thing of the format.
InvalidBase32
InvalidHex
InvalidRoot
Text that is not a root.
InvalidName
A name that the format does not allow.
HashMismatch
A thing does not hash to what it has to.
SizeMismatch
A thing does not have the size it has to.
TotalsMismatch
A record’s totals are not those of its tree.
IntakeFailed
An intake was used again after a part of its tree was refused.
NotWanted
Something arrived that is not tied to the root, or was not asked for.
Corrupt
A store holds, under a hash, bytes that are not what the hash says. Removing them from the store and fetching the tree again mends it.
Missing
A store does not hold something that the tree needs.
TooDeep
Folders sit inside one another more deeply than the format allows.
UnwritableName
A name that this system cannot hold as it is.
UnsupportedEntry
A link or a special file, where only files and folders are stored.
NonUtf8FileName
Peer
A peer could not answer, or stopped early.
LimitExceeded
AllocationFailed
SystemTimeBeforeUnixEpoch
SizeOverflow
Invariant
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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> 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