CacheError

Enumin simplefastly 0.13.1View source
1
2
3
4
5
6
7
8
9
10
11
#[non_exhaustive]
pub enum CacheError {
LimitExceeded,
InvalidOperation,
Unsupported,
Timeout,
Io(Error),
Purge(Error),
GetOrSet(Error),
Other(FastlyStatus),
}

Errors arising from cache operations.

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.

Timeout

A cache operation did not complete within its timeout.

Io

An IO error occurred during an operation.

0: std::io::Error

Purge

An error occurred when purging a value.

0: crate::Error

GetOrSet

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.

0: anyhow::Error

Other

An unknown error occurred.

0: fastly_shared::FastlyStatus

Trait implementations

impl Debug for CacheError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Parameters

self: &Self
f: &mut $crate::fmt::Formatter

Returns

$crate::fmt::Result

impl Display for CacheError

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Parameters

self: &Self
__formatter: &mut ::core::fmt::Formatter

Returns

::core::fmt::Result

impl Error for CacheError

fn source(&self) -> Option<&(dyn Error + 'static)>

Parameters

self: &Self

Returns

::core::option::Option<&(dyn Error + 'static)>

impl From<CacheError> for CacheError

fn from(value: CacheError) -> Self

Parameters

value: core::CacheError

Returns

Self

impl From<Error> for CacheError

fn from(source: Error) -> Self

Parameters

source: std::io::Error

Returns

Self

Auto trait implementations

Blanket implementations