pub trait SessionStorage:
Send
+ Sync
+ Debug {
// Required methods
fn save_session<'life0, 'async_trait>(
&'life0 self,
session: CompilerSession,
) -> Pin<Box<dyn Future<Output = Result<CompilerSession>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CompilerSession>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompilerSession>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Storage abstraction for compiler sessions.
Required Methods§
Sourcefn save_session<'life0, 'async_trait>(
&'life0 self,
session: CompilerSession,
) -> Pin<Box<dyn Future<Output = Result<CompilerSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_session<'life0, 'async_trait>(
&'life0 self,
session: CompilerSession,
) -> Pin<Box<dyn Future<Output = Result<CompilerSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save or update a session.
Sourcefn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CompilerSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CompilerSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a session by ID.
Sourcefn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a session.
Sourcefn list_sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompilerSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompilerSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all sessions.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".