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]
impl ContinuityCounterpub fn new(count: u8) -> ContinuityCounter[src]
pub fn new(count: u8) -> ContinuityCounterPanics if the given value is greater than 15.
pub fn count(&self) -> u8[src]
pub fn count(&self) -> u8Returns this counter's value, which will be between 0 and 15 inclusive.
pub fn follows(&self, other: ContinuityCounter) -> bool[src]
pub fn follows(&self, other: ContinuityCounter) -> booltrue 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]
impl PartialEq for ContinuityCounterfn eq(&self, other: &ContinuityCounter) -> bool[src]
fn eq(&self, other: &ContinuityCounter) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &ContinuityCounter) -> bool[src]
fn ne(&self, other: &ContinuityCounter) -> boolThis method tests for !=.
impl Debug for ContinuityCounter[src]
impl Debug for ContinuityCounterfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for ContinuityCounter[src]
impl Clone for ContinuityCounterfn clone(&self) -> ContinuityCounter[src]
fn clone(&self) -> ContinuityCounterReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Copy for ContinuityCounter[src]
impl Copy for ContinuityCounterimpl From<u8> for ContinuityCounter[src]
impl From<u8> for ContinuityCounterfn from(count: u8) -> ContinuityCounter[src]
fn from(count: u8) -> ContinuityCounterPerforms the conversion.
Auto Trait Implementations
impl Send for ContinuityCounter
impl Send for ContinuityCounterimpl Sync for ContinuityCounter
impl Sync for ContinuityCounter