#[non_exhaustive]pub struct ClosedSegment {
pub sequence_number: u32,
pub start_ns: u64,
pub duration_secs: f64,
pub discontinuous: bool,
}std only.Expand description
One closed segment’s identity/metadata as tracked by this origin’s
Window — HlsOrigin::closed_segments’s return shape. Deliberately
excludes the segment’s bytes: a caller merging this with another
segment source (issue #900) fetches bytes through the normal
ServedEgress::resolve resource path when it needs them, not through
this snapshot.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sequence_number: u32This segment’s sequence number (_HLS_msn-addressable).
start_ns: u64SegmentEntry::timeline_position, in nanoseconds — the Trunk’s
absolute timeline, for time-based windowing across sources that
share the same Trunk (e.g. multimux’s DVR archive, whose own
IndexEntry::start_pts_ns is exactly this same clock).
duration_secs: f64Segment duration in seconds.
discontinuous: boolWhether #EXT-X-DISCONTINUITY precedes this segment (RFC 8216
§4.3.4.3).
Implementations§
Source§impl ClosedSegment
impl ClosedSegment
Sourcepub fn new(
sequence_number: u32,
start_ns: u64,
duration_secs: f64,
discontinuous: bool,
) -> Self
pub fn new( sequence_number: u32, start_ns: u64, duration_secs: f64, discontinuous: bool, ) -> Self
Construct a ClosedSegment — needed because the type is
#[non_exhaustive] (a struct-literal outside this crate does not
typecheck), for a caller building test fixtures over the shape
HlsOrigin::closed_segments returns (e.g. multimux’s own
catch-up merge tests, issue #900) without depending on this
module’s private Window.
Trait Implementations§
Source§impl Clone for ClosedSegment
impl Clone for ClosedSegment
Source§fn clone(&self) -> ClosedSegment
fn clone(&self) -> ClosedSegment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more