pub struct SegmentSeq(/* private fields */);Available on crate feature
std only.Expand description
A segment sequence number: the Trunk’s own numbering of closed
segments (the moof/mfhd number, before any Media Sequence Number
offset is added). Also the parent-segment number of a part.
Implementations§
Source§impl SegmentSeq
impl SegmentSeq
Sourcepub const fn new(value: u32) -> SegmentSeq
pub const fn new(value: u32) -> SegmentSeq
Wrap a raw value.
Sourcepub const fn checked_next(self) -> Option<SegmentSeq>
pub const fn checked_next(self) -> Option<SegmentSeq>
The next value, or None if this is u32::MAX.
Sourcepub const fn wrapping_next(self) -> SegmentSeq
pub const fn wrapping_next(self) -> SegmentSeq
The next value, wrapping u32::MAX to 0.
Sourcepub const fn saturating_next(self) -> SegmentSeq
pub const fn saturating_next(self) -> SegmentSeq
The next value, saturating at u32::MAX.
Sourcepub const fn checked_add(self, n: u32) -> Option<SegmentSeq>
pub const fn checked_add(self, n: u32) -> Option<SegmentSeq>
self + n, or None on overflow.
Sourcepub const fn checked_sub(self, n: u32) -> Option<SegmentSeq>
pub const fn checked_sub(self, n: u32) -> Option<SegmentSeq>
self - n, or None on underflow.
Sourcepub const fn checked_distance_from(self, earlier: SegmentSeq) -> Option<u32>
pub const fn checked_distance_from(self, earlier: SegmentSeq) -> Option<u32>
The distance self - earlier, or None if earlier > self.
Trait Implementations§
Source§impl Clone for SegmentSeq
impl Clone for SegmentSeq
Source§fn clone(&self) -> SegmentSeq
fn clone(&self) -> SegmentSeq
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SegmentSeq
Source§impl Debug for SegmentSeq
impl Debug for SegmentSeq
Source§impl Default for SegmentSeq
impl Default for SegmentSeq
Source§fn default() -> SegmentSeq
fn default() -> SegmentSeq
Returns the “default value” for a type. Read more
Source§impl Display for SegmentSeq
impl Display for SegmentSeq
impl Eq for SegmentSeq
Source§impl Hash for SegmentSeq
impl Hash for SegmentSeq
Source§impl Ord for SegmentSeq
impl Ord for SegmentSeq
Source§fn cmp(&self, other: &SegmentSeq) -> Ordering
fn cmp(&self, other: &SegmentSeq) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SegmentSeq
impl PartialEq for SegmentSeq
Source§impl PartialOrd for SegmentSeq
impl PartialOrd for SegmentSeq
impl StructuralPartialEq for SegmentSeq
Auto Trait Implementations§
impl Forget for SegmentSeq
impl Freeze for SegmentSeq
impl RefUnwindSafe for SegmentSeq
impl Send for SegmentSeq
impl Sync for SegmentSeq
impl Unpin for SegmentSeq
impl UnsafeUnpin for SegmentSeq
impl UnwindSafe for SegmentSeq
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