Struct mpeg2ts_reader::packet::ContinuityCounter[][src]

pub struct ContinuityCounter { /* fields omitted */ }

A counter value used within a transport stream to detect discontinuities in a sequence of packets. The continuity counter should increase by one for each packet with a given PID for which adaptation_control indicates that a payload should be present.

See Packet.continuity_counter()

Implementations

impl ContinuityCounter[src]

pub fn new(count: u8) -> ContinuityCounter[src]

Panics if the given value is greater than 15.

pub fn count(self) -> u8[src]

Returns this counter’s value, which will be between 0 and 15 inclusive.

pub fn follows(self, other: ContinuityCounter) -> bool[src]

true iff the given ContinuityCounter value follows this one. Note that the maximum counter value is 15, and the counter ‘wraps around’:

let a = ContinuityCounter::new(0);
let b = ContinuityCounter::new(15);
assert!(a.follows(b));  // after 15, counter wraps around to 0

Trait Implementations

impl Clone for ContinuityCounter[src]

impl Copy for ContinuityCounter[src]

impl Debug for ContinuityCounter[src]

impl From<u8> for ContinuityCounter[src]

impl PartialEq<ContinuityCounter> for ContinuityCounter[src]

impl StructuralPartialEq for ContinuityCounter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.