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.
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 PartialEq for ContinuityCounter[src]
fn eq(&self, __arg_0: &ContinuityCounter) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ContinuityCounter) -> bool[src]
This method tests for !=.
impl Debug for ContinuityCounter[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Clone for ContinuityCounter[src]
fn clone(&self) -> ContinuityCounter[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Copy for ContinuityCounter[src]
impl From<u8> for ContinuityCounter[src]
fn from(count: u8) -> ContinuityCounter[src]
Performs the conversion.