pub struct InMemoryStorage { /* private fields */ }Expand description
In-memory storage implementation for testing.
WARNING: This implementation is NOT secure and should only be used for testing. All data is lost when the process exits.
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryStorage
impl Debug for InMemoryStorage
Source§impl Default for InMemoryStorage
impl Default for InMemoryStorage
Source§impl MlsStorage for InMemoryStorage
impl MlsStorage for InMemoryStorage
Source§fn store(&self, key_type: &str, key_id: &str, data: &[u8]) -> StorageResult<()>
fn store(&self, key_type: &str, key_id: &str, data: &[u8]) -> StorageResult<()>
Stores data with the given key type and ID. Read more
Source§fn load(&self, key_type: &str, key_id: &str) -> StorageResult<Option<Vec<u8>>>
fn load(&self, key_type: &str, key_id: &str) -> StorageResult<Option<Vec<u8>>>
Loads data for the given key type and ID. Read more
Source§fn delete(&self, key_type: &str, key_id: &str) -> StorageResult<()>
fn delete(&self, key_type: &str, key_id: &str) -> StorageResult<()>
Deletes data for the given key type and ID. Read more
Source§fn list_keys(&self, key_type: &str) -> StorageResult<Vec<String>>
fn list_keys(&self, key_type: &str) -> StorageResult<Vec<String>>
Lists all key IDs for a given key type. Read more
Source§fn exists(&self, key_type: &str, key_id: &str) -> StorageResult<bool>
fn exists(&self, key_type: &str, key_id: &str) -> StorageResult<bool>
Checks if a key exists. Read more
Source§fn clear_type(&self, key_type: &str) -> StorageResult<()>
fn clear_type(&self, key_type: &str) -> StorageResult<()>
Clears all data of a given key type. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryStorage
impl RefUnwindSafe for InMemoryStorage
impl Send for InMemoryStorage
impl Sync for InMemoryStorage
impl Unpin for InMemoryStorage
impl UnsafeUnpin for InMemoryStorage
impl UnwindSafe for InMemoryStorage
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> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more