Enum fastly::cache::simple::CacheError
source · #[non_exhaustive]pub enum CacheError {
LimitExceeded,
InvalidOperation,
Unsupported,
Io(Error),
Purge(Error),
GetOrSet(Error),
Other(FastlyStatus),
}
Expand description
Errors arising from cache operations.
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.
LimitExceeded
Operation failed due to a limit.
InvalidOperation
An underlying Core Cache API operation found an invalid state.
This should not arise during use of this API. If encountered, please report it as a bug.
Unsupported
Cache operation is not supported.
Io(Error)
An IO error occurred during an operation.
Purge(Error)
An error occurred when purging a value.
GetOrSet(Error)
An error occurred while running the closure argument of get_or_set()
.
This uses anyhow::Error
to provide maximum flexibility in how the closure reports errors.
Other(FastlyStatus)
An unknown error occurred.
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<CacheError> for CacheError
impl From<CacheError> for CacheError
source§fn from(value: CacheError) -> Self
fn from(value: CacheError) -> Self
Converts to this type from the input type.
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