#[non_exhaustive]pub struct Info {
pub timescale: Option<Timescale>,
pub priority: i8,
}Expand description
Publisher-side properties of a datagram track, fixed when it is created.
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.timescale: Option<Timescale>Units per second of each datagram’s timestamp, or None for a track without one.
A track is all timed or all untimed: a write that doesn’t match is refused with
Error::TimestampMismatch.
priority: i8The publisher’s priority for this track, higher first, defaulting to 0. It breaks ties between subscriptions of equal subscriber priority.
Implementations§
Source§impl Info
impl Info
Sourcepub fn with_timescale(self, timescale: impl Into<Option<Timescale>>) -> Self
pub fn with_timescale(self, timescale: impl Into<Option<Timescale>>) -> Self
Set the timestamp scale, or None for an untimed track, returning self for chaining.
Sourcepub fn with_priority(self, priority: i8) -> Self
pub fn with_priority(self, priority: i8) -> Self
Set the publisher’s priority, returning self for chaining.
Sourcepub fn rescale(&self, timestamp: Timestamp) -> Result<Timestamp>
pub fn rescale(&self, timestamp: Timestamp) -> Result<Timestamp>
timestamp at this track’s timescale.
A track is all timed or all scale-less: a timestamp that doesn’t match it, or one the
track’s scale can’t hold, is Error::TimestampMismatch. A writer that changes
state before its datagram reaches the track, such as encrypting it, rescales first so
a refused timestamp changes nothing.
Trait Implementations§
impl Copy for Info
impl Eq for Info
impl StructuralPartialEq for Info
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.