pub enum AssetError {
Io(Error),
Serialization(Error),
Config(String),
NotFound(String),
CacheDir(String),
Poisoned(String),
Core(Error),
}Expand description
Errors that can occur during asset cache operations.
Variants§
Io(Error)
Underlying filesystem I/O failure.
Serialization(Error)
Failed to (de)serialize JSON while reading / writing the index.
Config(String)
Failed to parse a human-readable size / duration in configuration.
NotFound(String)
The requested asset was not present in the cache index.
CacheDir(String)
The cache directory was unreachable or could not be created.
Poisoned(String)
The in-memory index mutex was poisoned by a panic in another thread. Callers can decide whether to recover (rebuild index) or bubble the error up to the user.
Core(Error)
Anything surfaced from devboy_core::Error.
Implementations§
Source§impl AssetError
impl AssetError
Trait Implementations§
Source§impl Debug for AssetError
impl Debug for AssetError
Source§impl Display for AssetError
impl Display for AssetError
Source§impl Error for AssetError
impl Error for AssetError
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 AssetError
impl From<Error> for AssetError
Source§impl From<Error> for AssetError
impl From<Error> for AssetError
Auto Trait Implementations§
impl Freeze for AssetError
impl !RefUnwindSafe for AssetError
impl Send for AssetError
impl Sync for AssetError
impl Unpin for AssetError
impl UnsafeUnpin for AssetError
impl !UnwindSafe for AssetError
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