pub trait SessionExt: Sized + Sealed {
// Required methods
fn session(&self) -> VortexSession;
fn get<V: SessionVar>(&self) -> Ref<'_, V>;
fn get_mut<V: SessionVar>(&self) -> RefMut<'_, V>;
}Expand description
Trait for accessing and modifying the state of a Vortex session.
Required Methods§
Sourcefn session(&self) -> VortexSession
fn session(&self) -> VortexSession
Returns the VortexSession.
Sourcefn get<V: SessionVar>(&self) -> Ref<'_, V>
fn get<V: SessionVar>(&self) -> Ref<'_, V>
Returns the scope variable of type V, or inserts a default one if it does not exist.
Sourcefn get_mut<V: SessionVar>(&self) -> RefMut<'_, V>
fn get_mut<V: SessionVar>(&self) -> RefMut<'_, V>
Returns the scope variable of type V, or inserts a default one if it does not exist.
Note that the returned value internally holds a lock on the variable.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.