Skip to main content

SessionService

Trait SessionService 

Source
pub trait SessionService: Send + Sync {
    // Required methods
    fn open_session(
        &self,
        principal: AuthenticatedIdentity,
        database_id: DatabaseId,
    ) -> BoxFuture<'_, Session>;
    fn close_session(&self, session_id: SessionId) -> BoxFuture<'_, ()>;
}
Expand description

Session lifecycle (S1D-003, S1D-004).

Required Methods§

Source

fn open_session( &self, principal: AuthenticatedIdentity, database_id: DatabaseId, ) -> BoxFuture<'_, Session>

Opens a session for an authenticated principal on a database.

Source

fn close_session(&self, session_id: SessionId) -> BoxFuture<'_, ()>

Closes a session, rolling back any active transaction and dropping its prepared statements.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§