pub struct ModeSessionContext<'a> { /* private fields */ }Expand description
Narrow wrapper around Session that mode plugins use to
initialize, restore, and extend their per-session state.
Exposes only generic per-session lifecycle capabilities. Mode-local
execution state is owned by the mode plugin itself and is accessed
through ModeSessionPlugin callbacks.
Prevents mode plugins from reaching into unrelated Session
internals.
Implementations§
Source§impl<'a> ModeSessionContext<'a>
impl<'a> ModeSessionContext<'a>
Sourcepub fn session_id(&self) -> &str
pub fn session_id(&self) -> &str
ID of the session being initialized/restored. Equivalent to the
session_id previously passed as a separate argument.
Auto Trait Implementations§
impl<'a> Freeze for ModeSessionContext<'a>
impl<'a> RefUnwindSafe for ModeSessionContext<'a>
impl<'a> Send for ModeSessionContext<'a>
impl<'a> Sync for ModeSessionContext<'a>
impl<'a> Unpin for ModeSessionContext<'a>
impl<'a> UnsafeUnpin for ModeSessionContext<'a>
impl<'a> UnwindSafe for ModeSessionContext<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more