Skip to main content

RuntimeSessionPersistence

Trait RuntimeSessionPersistence 

Source
pub trait RuntimeSessionPersistence: Send + Sync {
    // Required method
    fn save_runtime_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session: &'life1 mut Session,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Port for runtime (non-authoritative) session persistence.

Implementors must:

  • Serialize concurrent saves per session ID.
  • Merge on-disk authoritative metadata (title, pinned, title_version, metadata_version) before writing, so UI edits are never clobbered.

Required Methods§

Source

fn save_runtime_session<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 mut Session, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Persist the session, merging any newer authoritative metadata from disk.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl RuntimeSessionPersistence for LockedSessionStore

Infrastructure implementation of the domain runtime-persistence port. Server should assemble this as Arc<dyn RuntimeSessionPersistence> and must not define a separate adapter layer for the same behavior.

Source§

fn save_runtime_session<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 mut Session, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, LockedSessionStore: 'async_trait,

Source§

impl<T> RuntimeSessionPersistence for Arc<T>

Source§

fn save_runtime_session<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 mut Session, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Arc<T>: 'async_trait,

Implementors§