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.
Implementations
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]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ContinuityCounter
[src]
impl Debug for ContinuityCounter
[src]
impl From<u8> for ContinuityCounter
[src]
fn from(count: u8) -> ContinuityCounter
[src]
impl PartialEq<ContinuityCounter> for ContinuityCounter
[src]
fn eq(&self, other: &ContinuityCounter) -> bool
[src]
fn ne(&self, other: &ContinuityCounter) -> bool
[src]
impl StructuralPartialEq for ContinuityCounter
[src]
Auto Trait Implementations
impl RefUnwindSafe for ContinuityCounter
impl Send for ContinuityCounter
impl Sync for ContinuityCounter
impl Unpin for ContinuityCounter
impl UnwindSafe for ContinuityCounter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,