pub struct ProtocolSessionContext<'a> { /* private fields */ }Expand description
Narrow wrapper around Session that protocol plugins use to
initialize, restore, and extend their per-session state.
Exposes only generic per-session lifecycle capabilities. Protocol-local
execution state is owned by the protocol plugin itself and is accessed
through ProtocolSessionPlugin callbacks.
Prevents protocol plugins from reaching into unrelated Session
internals.
Implementations§
Source§impl<'a> ProtocolSessionContext<'a>
impl<'a> ProtocolSessionContext<'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 ProtocolSessionContext<'a>
impl<'a> RefUnwindSafe for ProtocolSessionContext<'a>
impl<'a> Send for ProtocolSessionContext<'a>
impl<'a> Sync for ProtocolSessionContext<'a>
impl<'a> Unpin for ProtocolSessionContext<'a>
impl<'a> UnsafeUnpin for ProtocolSessionContext<'a>
impl<'a> UnwindSafe for ProtocolSessionContext<'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