Skip to main content

Info

Struct Info 

Source
#[non_exhaustive]
pub struct Info { pub timescale: Timescale, pub latency_max: Duration, pub priority: u8, pub ordered: bool, /* private fields */ }
Expand description

Publisher-side properties of a track.

These are fixed by the publisher when the track is created and don’t change while the track is alive. A subscriber learns them via broadcast::Consumer::track, which returns the publisher’s Info once the subscription is accepted.

Not Copy: it carries an internal handle to its parent broadcast.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§timescale: Timescale

Units per second for per-frame timestamps on this track.

Every track is timed; this defaults to Timescale::MILLI. On Lite05+ it is reported in TRACK_INFO and the publisher zigzag-delta encodes per-frame timestamps at this scale on the wire. Protocols whose wire can’t carry it (pre-Lite05 moq-lite, IETF moq-transport) fall back to local monotonic milliseconds.

§latency_max: Duration

The maximum age of a non-latest group before the publisher evicts it (the newest group is always retained). A subscriber’s Subscription::latency_max window is clamped to this, since a group can’t be waited for longer than it’s kept around. Reported in TRACK_INFO so relays re-serve with the same window. Defaults to DEFAULT_LATENCY_MAX.

This is the Publisher Max Latency on the wire, the publisher-side half of the same budget Subscription::latency_max sets for a subscriber.

§priority: u8

The publisher’s priority for this track, used only to break ties between subscriptions of equal subscriber priority. Reported in TRACK_INFO (Lite05+).

§ordered: bool

Whether groups are prioritized in sequence order. Groups may always arrive out-of-order (or not at all) over the network. Used only to break ties, reported in TRACK_INFO (Lite05+), and defaults to false (newest-first).

Implementations§

Source§

impl Info

Source

pub fn with_timescale(self, timescale: Timescale) -> Self

Set the per-frame timestamp scale, returning self for chaining.

Defaults to Timescale::MILLI. On Lite05+ this scale is reported in TRACK_INFO and used to encode per-frame timestamps on the wire.

Source

pub fn with_latency_max(self, latency_max: Duration) -> Self

Set the maximum age of a non-latest group before eviction, returning self for chaining.

Source

pub fn with_priority(self, priority: u8) -> Self

Set the publisher’s tie-break priority, returning self for chaining.

Source

pub fn with_ordered(self, ordered: bool) -> Self

Set whether groups are prioritized in sequence order, returning self for chaining. Groups may always arrive out-of-order (or not at all) over the network. Defaults to false.

Trait Implementations§

Source§

impl Clone for Info

Source§

fn clone(&self) -> Info

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Info

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Info

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Info

§

impl RefUnwindSafe for Info

§

impl Send for Info

§

impl Sync for Info

§

impl Unpin for Info

§

impl UnsafeUnpin for Info

§

impl UnwindSafe for Info

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSync for T
where T: Sync,

Source§

impl<T> MaybeSync for T
where T: Sync,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more