pub enum CacheError {
Show 15 variants
Io(Error),
InvalidName(String),
ConfigParse(String),
NotFound(String),
PermissionDenied(String),
AlreadyExists(String),
Expired(String),
InvalidConfig(String),
Serialization(String),
InvalidPath(String),
SymlinkDetected(String),
SizeLimitExceeded(String),
FileCountLimitExceeded(String),
Corrupted(String),
Generic(String),
}Expand description
Cache library error types
Variants§
Io(Error)
I/O operation failed
InvalidName(String)
Invalid cache name
ConfigParse(String)
Configuration parsing error
NotFound(String)
Cache object not found
PermissionDenied(String)
Permission denied for operation
AlreadyExists(String)
Cache object already exists
Expired(String)
Cache object has expired
InvalidConfig(String)
Invalid configuration provided
Serialization(String)
Serialization/deserialization error
InvalidPath(String)
Invalid path or directory
SymlinkDetected(String)
Symbolic link detected (security risk)
SizeLimitExceeded(String)
Cache size limit exceeded
FileCountLimitExceeded(String)
Cache file count limit exceeded
Corrupted(String)
Cache object corrupted
Generic(String)
Generic error with message
Implementations§
Source§impl CacheError
impl CacheError
Sourcepub fn is_io_error(&self) -> bool
pub fn is_io_error(&self) -> bool
Checks if the error is an I/O error
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Checks if the error indicates something wasn’t found
Sourcepub fn is_permission_denied(&self) -> bool
pub fn is_permission_denied(&self) -> bool
Checks if the error indicates permission was denied
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
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()
Source§impl From<Error> for CacheError
impl From<Error> for CacheError
Auto Trait Implementations§
impl Freeze for CacheError
impl !RefUnwindSafe for CacheError
impl Send for CacheError
impl Sync for CacheError
impl Unpin for CacheError
impl !UnwindSafe 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