pub struct MemoryKeyValueStore { /* private fields */ }Expand description
An in-process byte-oriented key-value store.
Implementations§
Trait Implementations§
Source§impl KeyValueStore for MemoryKeyValueStore
impl KeyValueStore for MemoryKeyValueStore
Source§fn list_keys<'life0, 'async_trait>(
&'life0 self,
opts: ListKeysOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<KeyList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_keys<'life0, 'async_trait>(
&'life0 self,
opts: ListKeysOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<KeyList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists keys in lexical order after the exclusive cursor.
A zero limit returns an empty, non-truncated page. This avoids claiming that a caller can continue when the page contains no key to use as its next exclusive cursor.
Source§fn get_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<KvEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<KvEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets a stored byte value.
Source§fn set_bytes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Bytes,
content_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_bytes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Bytes,
content_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sets a stored byte value and content type.
Auto Trait Implementations§
impl !Freeze for MemoryKeyValueStore
impl RefUnwindSafe for MemoryKeyValueStore
impl Send for MemoryKeyValueStore
impl Sync for MemoryKeyValueStore
impl Unpin for MemoryKeyValueStore
impl UnsafeUnpin for MemoryKeyValueStore
impl UnwindSafe for MemoryKeyValueStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<K> KeyValueStoreExt for Kwhere
K: KeyValueStore + ?Sized,
impl<K> KeyValueStoreExt for Kwhere
K: KeyValueStore + ?Sized,
Source§fn get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait + DeserializeOwned + 'static,
Self: Sync + 'async_trait,
fn get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait + DeserializeOwned + 'static,
Self: Sync + 'async_trait,
Gets and deserializes a JSON value.