Skip to main content

SessionStore

Trait SessionStore 

Source
pub trait SessionStore: Send + Sync {
    // Required methods
    fn put_session(
        &self,
        session: SupervisionSession,
    ) -> BoxFuture<'_, Result<(), StoreError>>;
    fn session(
        &self,
        print_id: PrintId,
    ) -> BoxFuture<'_, Result<Option<SupervisionSession>, StoreError>>;
}
Expand description

The supervision session of a print.

Every method is asynchronous, the trait is dyn-compatible, and it is shareable across threads, because its consumers hold it behind Arc<dyn SessionStore>.

Required Methods§

Source

fn put_session( &self, session: SupervisionSession, ) -> BoxFuture<'_, Result<(), StoreError>>

Store one print’s supervision session.

Source

fn session( &self, print_id: PrintId, ) -> BoxFuture<'_, Result<Option<SupervisionSession>, StoreError>>

Read one print’s supervision session.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§