pub trait SessionContext: ReadonlyContext {
// Required methods
fn session_state(&self) -> &SessionState;
fn session_state_mut(&mut self) -> &mut SessionState;
}Expand description
Context available during a session’s lifetime.
Extends ReadonlyContext with mutable session state and access
to the session store for persistence.
Required Methods§
Sourcefn session_state(&self) -> &SessionState
fn session_state(&self) -> &SessionState
Returns the current session state (key-value store scoped to the session).
Sourcefn session_state_mut(&mut self) -> &mut SessionState
fn session_state_mut(&mut self) -> &mut SessionState
Returns mutable access to session state.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".