pub trait SessionEventStore: Send + Sync {
// Required methods
fn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
session_id: &'life2 str,
expected_seq: u64,
events: Vec<Event>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionEvent>, EventError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
session_id: &'life2 str,
after_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionEvent>, EventError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Append-only Session event storage.
Required Methods§
Sourcefn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
session_id: &'life2 str,
expected_seq: u64,
events: Vec<Event>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionEvent>, EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
session_id: &'life2 str,
expected_seq: u64,
events: Vec<Event>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionEvent>, EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Append events atomically after expected_seq; returns them with sequences.
Sourcefn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
session_id: &'life2 str,
after_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionEvent>, EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
session_id: &'life2 str,
after_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionEvent>, EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Events after after_seq.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".