pub trait SessionLedger: Send + Sync {
// Required methods
fn append_observation<'life0, 'async_trait>(
&'life0 self,
observation: MemoryObservation,
) -> Pin<Box<dyn Future<Output = Result<LedgerOutcome, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SessionLedgerSnapshot, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn seal<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SealedSessionLedger, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Accumulates observations for a logical session.
Required Methods§
Sourcefn append_observation<'life0, 'async_trait>(
&'life0 self,
observation: MemoryObservation,
) -> Pin<Box<dyn Future<Output = Result<LedgerOutcome, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append_observation<'life0, 'async_trait>(
&'life0 self,
observation: MemoryObservation,
) -> Pin<Box<dyn Future<Output = Result<LedgerOutcome, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Offer an observation to the ledger.
Sourcefn snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SessionLedgerSnapshot, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SessionLedgerSnapshot, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the current candidate set.
Sourcefn seal<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SealedSessionLedger, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn seal<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SealedSessionLedger, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the ledger and hand its candidates to consolidation.