pub struct WebSocketStreamSession {
pub id: String,
pub created_at: Instant,
pub options: StreamOptions,
pub plan: Vec<StreamFrame>,
pub current_frame: u32,
pub acknowledged_frames: Vec<u32>,
pub client_metrics: ClientMetrics,
pub rate_limit_guard: Option<RateLimitGuard>,
/* private fields */
}Expand description
WebSocket streaming session state.
This type is intentionally distinct from the domain-layer
crate::domain::aggregates::StreamSession aggregate. The WebSocket
transport maintains an ephemeral, transport-local session model with raw
String identifiers and an in-memory HashMap keyed off
AdaptiveStreamController; it does not share state with the
StreamRepositoryGat-backed domain session created by
POST /pjs/sessions. Sessions created over WebSocket cannot be addressed
over HTTP and vice versa, and dictionary training, auth, and rate-limit
middleware applied to the HTTP router do not apply to this controller.
See issue #239 for the full rationale and the deliberate split between the two session models.
Fields§
§id: StringTransport-local session identifier.
created_at: InstantInstant the session was created.
options: StreamOptionsStreaming options negotiated for this session.
plan: Vec<StreamFrame>Pre-computed delivery plan as an ordered list of frames.
current_frame: u32Index of the next frame to send.
acknowledged_frames: Vec<u32>Frame indices acknowledged by the client so far.
client_metrics: ClientMetricsAdaptive streaming metrics derived from client acks.
rate_limit_guard: Option<RateLimitGuard>Rate-limit guard scoped to this session, if installed.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WebSocketStreamSession
impl !UnwindSafe for WebSocketStreamSession
impl Freeze for WebSocketStreamSession
impl Send for WebSocketStreamSession
impl Sync for WebSocketStreamSession
impl Unpin for WebSocketStreamSession
impl UnsafeUnpin for WebSocketStreamSession
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> 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 more