CacheEntry

Structin simplefastly 0.13.1View source
pub struct CacheEntry {
pub value: Body,
pub ttl: Duration,
}

The return type of the closure provided to get_or_set_with().

Fields

value

crate::Body

The value to cache.

Argument type conversion

See the From impls for Body to see which types can be used as a body.

ttl

std::time::Duration

The time-to-live for the cache entry.

Trait implementations

impl Debug for CacheEntry

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

Parameters

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

Returns

$crate::fmt::Result

Auto trait implementations

Blanket implementations