pub struct StreamSession {Show 13 fields
pub current_latency_ms: f64,
pub current_bandwidth_mbps: f64,
pub current_error_rate: f64,
pub current_cpu_usage: f64,
pub current_memory_usage_percent: f64,
pub active_connection_count: usize,
pub frames_processed: u64,
pub bytes_transferred: u64,
pub session_start_time: Instant,
pub last_metrics_update: Instant,
pub priority_override: Option<Priority>,
pub performance_trend: PerformanceTrend,
pub adaptive_adjustments: Vec<AdaptiveAdjustment>,
}Expand description
Dynamic session state tracking runtime metrics and performance This data changes frequently during a session’s lifetime
Fields§
§current_latency_ms: f64Current average latency in milliseconds
current_bandwidth_mbps: f64Current bandwidth utilization in Mbps
current_error_rate: f64Current error rate (0.0-1.0)
current_cpu_usage: f64Current CPU usage (0.0-1.0)
current_memory_usage_percent: f64Current memory usage percentage (0.0-100.0)
active_connection_count: usizeCurrent active connection count
frames_processed: u64Number of frames processed in this session
bytes_transferred: u64Total bytes transferred in this session
session_start_time: InstantSession start time
last_metrics_update: InstantLast update time for metrics
priority_override: Option<Priority>Current priority override (if any)
performance_trend: PerformanceTrendPerformance trend (improving/degrading/stable)
adaptive_adjustments: Vec<AdaptiveAdjustment>Adaptive adjustments made during this session
Implementations§
Source§impl StreamSession
Utility functions for migration from old PerformanceContext
impl StreamSession
Utility functions for migration from old PerformanceContext
Sourcepub fn from_performance_context(ctx: &PerformanceContext) -> Self
pub fn from_performance_context(ctx: &PerformanceContext) -> Self
Create from legacy PerformanceContext
Sourcepub fn to_performance_context(&self) -> PerformanceContext
pub fn to_performance_context(&self) -> PerformanceContext
Convert to legacy PerformanceContext for backward compatibility
Trait Implementations§
Source§impl Clone for StreamSession
impl Clone for StreamSession
Source§fn clone(&self) -> StreamSession
fn clone(&self) -> StreamSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamSession
impl Debug for StreamSession
Auto Trait Implementations§
impl Freeze for StreamSession
impl RefUnwindSafe for StreamSession
impl Send for StreamSession
impl Sync for StreamSession
impl Unpin for StreamSession
impl UnwindSafe for StreamSession
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
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>
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