[−][src]Struct mpeg2ts_reader::packet::ContinuityCounter
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 Clone for ContinuityCounter[src]
fn clone(&self) -> 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]
fn from(count: u8) -> ContinuityCounter[src]
impl Copy for ContinuityCounter[src]
impl PartialEq<ContinuityCounter> for ContinuityCounter[src]
fn eq(&self, other: &ContinuityCounter) -> bool[src]
fn ne(&self, other: &ContinuityCounter) -> bool[src]
impl Debug for ContinuityCounter[src]
Auto Trait Implementations
impl Send for ContinuityCounter
impl Sync for ContinuityCounter
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,