pub struct OperatorSessionEntry {
pub sid: String,
pub token: String,
pub roles: Vec<String>,
pub ws_session: Mutex<Option<Arc<WSOperatorSession>>>,
}Expand description
Login-flow record for a minted Operator session. Held in
AppState.operator_sessions, keyed by sid. ws_session starts None
(login only mints sid+token) and is set on first successful WS connect;
on reconnect the same WSOperatorSession is reused (replace_tx) rather
than re-registered.
Fields§
§sid: StringServer-minted session id (op-<uuid>).
token: StringBearer auth token (10-hex-char) required on the WS upgrade and admin routes.
roles: Vec<String>Role aliases claimed by this session (roles-exclusivity set).
ws_session: Mutex<Option<Arc<WSOperatorSession>>>The live 3-trait session object once a WS has connected; None before first connect.
Auto Trait Implementations§
impl !Freeze for OperatorSessionEntry
impl !RefUnwindSafe for OperatorSessionEntry
impl !UnwindSafe for OperatorSessionEntry
impl Send for OperatorSessionEntry
impl Sync for OperatorSessionEntry
impl Unpin for OperatorSessionEntry
impl UnsafeUnpin for OperatorSessionEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more