pub struct StreamInspectorSnapshot {
pub stream_id: Symbol,
pub route: Symbol,
pub media: StreamMedia,
pub profile: Symbol,
pub clock: Symbol,
pub status: StreamInspectorStatus,
pub buffer: BufferPolicy,
pub queue_depth: usize,
pub dropped_count: u64,
pub last_sequence: Option<u64>,
pub recent_diagnostics: Vec<Symbol>,
}Expand description
Point-in-time observation of a single stream’s identity and health.
Captures the stream’s metadata-derived identity (id, media, clock, buffer
policy), its routing and transport profile, its current
StreamInspectorStatus, and live queue/loss counters. Render with
StreamInspectorSnapshot::to_expr to hand the snapshot to a codec.
Fields§
§stream_id: SymbolStable identifier of the observed stream.
route: SymbolRoute the stream is being observed on.
media: StreamMediaMedia kind carried by the stream.
profile: SymbolName of the transport profile in effect.
clock: SymbolClock domain the stream is timed against.
status: StreamInspectorStatusCurrent lifecycle status of the stream.
buffer: BufferPolicyBounded buffer policy governing the stream’s queue.
queue_depth: usizeNumber of items currently queued in the buffer.
dropped_count: u64Total items dropped (newest plus oldest) since the stream opened.
last_sequence: Option<u64>Sequence number of the most recent observed item, if any.
recent_diagnostics: Vec<Symbol>Recent diagnostic symbols collected for the stream.
Implementations§
Source§impl StreamInspectorSnapshot
impl StreamInspectorSnapshot
Sourcepub fn new(
metadata: &StreamMetadata,
route: Symbol,
profile: Symbol,
status: StreamInspectorStatus,
queue_depth: usize,
stats: &StreamStats,
last_sequence: Option<u64>,
recent_diagnostics: Vec<Symbol>,
) -> Self
pub fn new( metadata: &StreamMetadata, route: Symbol, profile: Symbol, status: StreamInspectorStatus, queue_depth: usize, stats: &StreamStats, last_sequence: Option<u64>, recent_diagnostics: Vec<Symbol>, ) -> Self
Builds a snapshot from stream metadata, stats, and observed counters.
Sourcepub fn from_stream_value(
stream: &StreamValue,
route: Symbol,
profile: &TransportProfile,
recent_diagnostics: Vec<Symbol>,
) -> Result<Self>
pub fn from_stream_value( stream: &StreamValue, route: Symbol, profile: &TransportProfile, recent_diagnostics: Vec<Symbol>, ) -> Result<Self>
Builds a snapshot by querying a live StreamValue.
Reads the stream’s stats, queue depth, and completion flag to derive the
last observed sequence and StreamInspectorStatus. Returns an error if
any of those queries fail.
Trait Implementations§
Source§impl Clone for StreamInspectorSnapshot
impl Clone for StreamInspectorSnapshot
Source§fn clone(&self) -> StreamInspectorSnapshot
fn clone(&self) -> StreamInspectorSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamInspectorSnapshot
impl Debug for StreamInspectorSnapshot
impl Eq for StreamInspectorSnapshot
Source§impl PartialEq for StreamInspectorSnapshot
impl PartialEq for StreamInspectorSnapshot
Source§fn eq(&self, other: &StreamInspectorSnapshot) -> bool
fn eq(&self, other: &StreamInspectorSnapshot) -> bool
self and other values to be equal, and is used by ==.