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

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()

Methods

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]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<u8> for ContinuityCounter[src]

impl Copy for ContinuityCounter[src]

impl PartialEq<ContinuityCounter> for ContinuityCounter[src]

impl Debug for ContinuityCounter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.