pub trait Session: Send + Sync {
// Required methods
fn session_id(&self) -> &str;
fn get_items(&self, limit: Option<usize>) -> SessionFuture<Vec<SessionItem>>;
fn add_items(&self, items: Vec<SessionItem>) -> SessionFuture<()>;
fn pop_item(&self) -> SessionFuture<Option<SessionItem>>;
fn clear(&self) -> SessionFuture<()>;
}Required Methods§
fn session_id(&self) -> &str
fn get_items(&self, limit: Option<usize>) -> SessionFuture<Vec<SessionItem>>
fn add_items(&self, items: Vec<SessionItem>) -> SessionFuture<()>
fn pop_item(&self) -> SessionFuture<Option<SessionItem>>
fn clear(&self) -> SessionFuture<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".