Struct pond_cache::Cache
source · pub struct Cache { /* private fields */ }Implementations§
source§impl Cache
impl Cache
pub fn new(path: PathBuf) -> Result<Self, Error>
pub fn with_time_to_live(path: PathBuf, ttl: Duration) -> Result<Self, Error>
pub fn get<T: FromSql>(&self, key: &Uuid) -> Result<Option<T>, Error>
pub fn store<T: ToSql>(&self, key: &Uuid, value: T) -> Result<(), Error>
pub fn clean(&self) -> Result<(), Error>
Auto Trait Implementations§
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