#[non_exhaustive]pub enum CacheError {
ManifestNotFound {
id: String,
},
ObjectNotFound {
checksum: String,
},
Integrity {
expected: String,
actual: String,
},
Parse(ParseError),
Io(Error),
}Expand description
Errors the cache integrity machinery can surface.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ManifestNotFound
The manifest for the requested snapshot id was not present in the cache.
Mirrors the oracle’s “Manifest not found locally. Did you forget to
fetch …?” failure in _snapdir_check_integrity.
ObjectNotFound
A file object referenced by the manifest was missing from the cache.
Integrity
A cached object’s bytes did not hash to the address it is filed under — the object is corrupt or tampered.
Fields
Parse(ParseError)
A manifest’s text could not be parsed.
Io(Error)
An underlying filesystem failure.
Trait Implementations§
Source§impl Debug for CacheError
impl Debug for CacheError
Source§impl Display for CacheError
impl Display for CacheError
Source§impl Error for CacheError
impl Error for CacheError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for CacheError
impl From<Error> for CacheError
Source§impl From<ParseError> for CacheError
impl From<ParseError> for CacheError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CacheError
impl !UnwindSafe for CacheError
impl Freeze for CacheError
impl Send for CacheError
impl Sync for CacheError
impl Unpin for CacheError
impl UnsafeUnpin for CacheError
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
Mutably borrows from an owned value. Read more