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

Methods

impl ContinuityCounter
[src]

Panics if the given value is greater than 15.

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

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 PartialEq for ContinuityCounter
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for ContinuityCounter
[src]

Formats the value using the given formatter. Read more

impl Clone for ContinuityCounter
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for ContinuityCounter
[src]

impl From<u8> for ContinuityCounter
[src]

Performs the conversion.

Auto Trait Implementations