pub struct SessionState {
pub session_id: SessionId,
pub principal: Option<String>,
pub capabilities: Capabilities,
pub phase: HandshakePhase,
pub active_challenge: Option<String>,
}Expand description
Server-side bookkeeping for one session.
Fields§
§session_id: SessionIdSession identifier.
principal: Option<String>Authenticated principal (set after session.accepted).
capabilities: CapabilitiesNegotiated capability set.
phase: HandshakePhaseCurrent handshake phase.
active_challenge: Option<String>Active challenge nonce (set during Challenged).
Implementations§
Source§impl SessionState
impl SessionState
Sourcepub const fn new(session_id: SessionId, capabilities: Capabilities) -> Self
pub const fn new(session_id: SessionId, capabilities: Capabilities) -> Self
Construct a new session in HandshakePhase::Opened.
Sourcepub const fn is_accepted(&self) -> bool
pub const fn is_accepted(&self) -> bool
True when the session has completed the handshake and may carry non-handshake protocol traffic.
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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