pub struct SessionActorHandle {
pub tx: Sender<SessionCommand>,
pub tx_out: Sender<SessionOutput>,
pub last_active: Instant,
pub cancel: CancellationToken,
}Expand description
Bookkeeping handle for one live session, held by LiveSessionRegistry (spec §9.3).
Cheap to clone — tx/tx_out are Arc-backed channel senders.
Fields§
§tx: Sender<SessionCommand>Mailbox for SessionCommands; same-session prompts are serialized by this mpsc’s FIFO
ordering (spec §9.2 concurrency policy — no separate turn-lock needed).
tx_out: Sender<SessionOutput>Broadcast source new subscribers (SSE connections, TUI attach) subscribe to.
last_active: InstantUpdated by LiveSessionRegistry::get on every lookup; read by
LiveSessionRegistry::idle_candidates for TTL eviction.
cancel: CancellationTokenCancelling this token ends exactly this session’s actor gracefully — the same effect as
sending SessionCommand::Shutdown, but usable without an owned mpsc permit. What
serve.evict idle eviction (spec §9.3) calls to target one session without affecting any
other live actor. Distinct from the process-wide TaskSupervisor cancellation token.
Trait Implementations§
Source§impl Clone for SessionActorHandle
impl Clone for SessionActorHandle
Source§fn clone(&self) -> SessionActorHandle
fn clone(&self) -> SessionActorHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SessionActorHandle
impl !UnwindSafe for SessionActorHandle
impl Freeze for SessionActorHandle
impl Send for SessionActorHandle
impl Sync for SessionActorHandle
impl Unpin for SessionActorHandle
impl UnsafeUnpin for SessionActorHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request