pub struct MemorySessionStore { /* private fields */ }Implementations§
Source§impl MemorySessionStore
impl MemorySessionStore
pub fn new() -> Self
pub fn with_hooks(hooks: StoreHooks) -> Self
Trait Implementations§
Source§impl Clone for MemorySessionStore
impl Clone for MemorySessionStore
Source§fn clone(&self) -> MemorySessionStore
fn clone(&self) -> MemorySessionStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for MemorySessionStore
impl Default for MemorySessionStore
Source§impl SessionImporter for MemorySessionStore
impl SessionImporter for MemorySessionStore
fn import<'life0, 'async_trait>(
&'life0 self,
request: ImportSession,
) -> Pin<Box<dyn Future<Output = StoreResult<ImportResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl SessionStore for MemorySessionStore
impl SessionStore for MemorySessionStore
Source§fn hooks(&self) -> &StoreHooks
fn hooks(&self) -> &StoreHooks
Plug-in processors configured for this store. The default
Self::sweep_retention reads hooks.archive_sink so the
retention loop can hand archived sessions to durable storage
without callers wiring the sink explicitly.fn create<'life0, 'async_trait>(
&'life0 self,
request: CreateSession,
) -> Pin<Box<dyn Future<Output = StoreResult<SessionMeta>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn describe<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StoreResult<SessionMeta>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
filter: ListFilter,
) -> Pin<Box<dyn Future<Output = StoreResult<Vec<SessionMeta>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
event: AppendEvent,
) -> Pin<Box<dyn Future<Output = StoreResult<StoredEvent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
range: ReadRange,
) -> Pin<Box<dyn Future<Output = StoreResult<EventPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fork<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
at_event_id: EventId,
child_id: Option<SessionId>,
) -> Pin<Box<dyn Future<Output = StoreResult<ForkResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
at_event_id: EventId,
) -> Pin<Box<dyn Future<Output = StoreResult<TruncateResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StoreResult<Snapshot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn replay<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot_id: &'life1 SnapshotId,
) -> Pin<Box<dyn Future<Output = StoreResult<Snapshot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StoreResult<StoredEvent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn soft_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StoreResult<SessionMeta>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn hard_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StoreResult<VerifyReport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn sweep_retention<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 RetentionPolicy,
now_ms: i64,
) -> Pin<Box<dyn Future<Output = StoreResult<SweepReport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sweep_retention<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 RetentionPolicy,
now_ms: i64,
) -> Pin<Box<dyn Future<Output = StoreResult<SweepReport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sweep retention. Backends with native scheduling can override
to skip the default loop; the default sweeps all sessions
against the configured
RetentionPolicy and routes archived
sessions + tombstones through hooks().archive_sink when set.Auto Trait Implementations§
impl !RefUnwindSafe for MemorySessionStore
impl !UnwindSafe for MemorySessionStore
impl Freeze for MemorySessionStore
impl Send for MemorySessionStore
impl Sync for MemorySessionStore
impl Unpin for MemorySessionStore
impl UnsafeUnpin for MemorySessionStore
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