pub struct Cache { /* private fields */ }Implementations§
Source§impl Cache
impl Cache
pub fn new() -> CacheResult<Self>
pub async fn has(&self, key: &str) -> CacheResult<bool>
pub async fn get(&self, key: &str) -> CacheResult<Option<String>>
pub async fn insert(&self, key: &str, value: &str) -> CacheResult<()>
pub async fn remove(&self, key: &str) -> CacheResult<()>
pub async fn clear(&self) -> CacheResult<()>
Trait Implementations§
Source§impl InstanceTrait for Cache
impl InstanceTrait for Cache
type Error = Error
fn register<'life0, 'async_trait>(
_: &'life0 Container,
) -> Pin<Box<dyn Future<Output = Result<Self, ContainerError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
fn name() -> String
fn boot<'async_trait>() -> Pin<Box<dyn Future<Output = Result<(), ContainerError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn cleanup() -> Result<(), ContainerError>
fn facade() -> &'static Selfwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for Cache
impl !RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl !UnwindSafe for Cache
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