pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
pub fn new(max_memory_bytes: Option<u64>) -> Self
pub fn get(&self, key: &str) -> Option<Vec<u8>>
pub fn set( &self, key: String, value: Vec<u8>, ttl: Option<Duration>, ) -> Result<(), ()>
pub fn del(&self, keys: &[String]) -> usize
pub fn expire(&self, key: &str, ttl: Duration) -> bool
pub fn ttl(&self, key: &str) -> Option<Duration>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Store
impl !RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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