pub struct InMemoryRememberStore { /* private fields */ }Expand description
In-memory store — for tests and as a reference implementation.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryRememberStore
impl Default for InMemoryRememberStore
Source§fn default() -> InMemoryRememberStore
fn default() -> InMemoryRememberStore
Returns the “default value” for a type. Read more
Source§impl RememberEntitiesStore for InMemoryRememberStore
impl RememberEntitiesStore for InMemoryRememberStore
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
shard_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HashSet<String>, RememberError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
shard_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HashSet<String>, RememberError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the full entity-id set for
shard_id.Source§fn add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
shard_id: &'life1 str,
entity_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RememberError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
shard_id: &'life1 str,
entity_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RememberError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist that
entity_id is now active in shard_id.Source§fn remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
shard_id: &'life1 str,
entity_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RememberError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
shard_id: &'life1 str,
entity_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RememberError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist that
entity_id is no longer active in shard_id
(typically after passivation).Auto Trait Implementations§
impl !Freeze for InMemoryRememberStore
impl !RefUnwindSafe for InMemoryRememberStore
impl Send for InMemoryRememberStore
impl Sync for InMemoryRememberStore
impl Unpin for InMemoryRememberStore
impl UnsafeUnpin for InMemoryRememberStore
impl UnwindSafe for InMemoryRememberStore
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