Struct eva_common::cache::TtlCache
source · pub struct TtlCache { /* private fields */ }Implementations
sourceimpl TtlCache
impl TtlCache
pub async fn create(
path: &str,
ttl: Duration,
timeout: Duration,
pool_size: u32
) -> EResult<Self>
pub async fn set<V: Serialize>(&self, key: &str, value: &V) -> EResult<()>
pub async fn get<V: DeserializeOwned>(&self, key: &str) -> EResult<Option<V>>
pub async fn delete(&self, key: &str) -> EResult<()>
pub async fn purge(&self) -> EResult<()>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TtlCache
impl Send for TtlCache
impl Sync for TtlCache
impl Unpin for TtlCache
impl !UnwindSafe for TtlCache
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more