pub struct Memory { /* private fields */ }Expand description
The memory façade over the store.
Implementations§
Source§impl Memory
impl Memory
pub fn new(max_value_bytes: usize, list_default_limit: usize) -> Memory
Sourcepub fn check_key(key: &str) -> Result<(), String>
pub fn check_key(key: &str) -> Result<(), String>
Validate a key: non-empty, no whitespace, not reserved, bounded.
Sourcepub fn set(
&mut self,
d: &Durable,
key: &str,
value: Value,
ttl_ms: Option<u64>,
by: Option<&str>,
) -> Result<Value, String>
pub fn set( &mut self, d: &Durable, key: &str, value: Value, ttl_ms: Option<u64>, by: Option<&str>, ) -> Result<Value, String>
memory.set {key, value, ttl?} → the record’s meta.
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
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