pub enum Error<K, E>{
Init(PathBuf),
NotInCache(K),
NotOnDisk(K),
NotFound(K),
FileOp(E),
Immutable(K),
}
Expand description
Errors produced by FileBackedLfuCache
.
Variants§
Init(PathBuf)
Cannot initialise the given path as a backing directory.
This can happen if the path does not resolve to a directory.
NotInCache(K)
An item cannot be found with this key in cache.
NotOnDisk(K)
An item cannot be found with this key on disk.
NotFound(K)
An item cannot be found with this key either in cache or on disk.
FileOp(E)
An error occurred when performing file operations.
The inner type is the user-defined associated type of AsyncFileRepr
.
Immutable(K)
An item with this key is temporarily immutable due to outstanding references.
This can happen if you are holding a reference elsewhere, or if this item is in the process of being flushed to disk.
Trait Implementations§
Source§impl<K, E> Error for Error<K, E>
impl<K, E> Error for Error<K, E>
1.30.0 · 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()
Auto Trait Implementations§
impl<K, E> Freeze for Error<K, E>
impl<K, E> RefUnwindSafe for Error<K, E>where
K: RefUnwindSafe,
E: RefUnwindSafe,
impl<K, E> Send for Error<K, E>
impl<K, E> Sync for Error<K, E>
impl<K, E> Unpin for Error<K, E>
impl<K, E> UnwindSafe for Error<K, E>where
K: UnwindSafe,
E: UnwindSafe,
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