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§
Sourcefn put_session(
&self,
session: SupervisionSession,
) -> BoxFuture<'_, Result<(), StoreError>>
fn put_session( &self, session: SupervisionSession, ) -> BoxFuture<'_, Result<(), StoreError>>
Store one print’s supervision session.
Sourcefn session(
&self,
print_id: PrintId,
) -> BoxFuture<'_, Result<Option<SupervisionSession>, StoreError>>
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".