Skip to main content

Packets

Struct Packets 

Source
pub struct Packets<'data, const BUFFER_SIZE: usize> { /* private fields */ }
Expand description

Iterator for ogg packets.

Note that this does not implement Iterator trait because it is not possible to borrow from iterator in Item.

Implementations§

Source§

impl<const BUFFER_SIZE: usize> Packets<'_, BUFFER_SIZE>

Source

pub fn current_page_sequence_number(&self) -> u32

Returns page sequence number for the page being read.

Source

pub fn last_page_sequence_number(&self) -> u32

Returns page sequence number of the last page.

Source

pub fn bitstream_serial_number(&self) -> u32

Returns bitstream serial number for the page being read.

Source

pub fn end_of_stream(&self) -> bool

Returns whether the current page is the end of the stream.

Source

pub fn next(&mut self) -> Option<Packet<'_>>

Iterates to the next packet and returns it, or None if the last packet has been read.

Trait Implementations§

Source§

impl<'data, const BUFFER_SIZE: usize> Debug for Packets<'data, BUFFER_SIZE>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'data, const BUFFER_SIZE: usize> PartialEq for Packets<'data, BUFFER_SIZE>

Source§

fn eq(&self, other: &Packets<'data, BUFFER_SIZE>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'data, const BUFFER_SIZE: usize> StructuralPartialEq for Packets<'data, BUFFER_SIZE>

Auto Trait Implementations§

§

impl<'data, const BUFFER_SIZE: usize> Freeze for Packets<'data, BUFFER_SIZE>

§

impl<'data, const BUFFER_SIZE: usize> RefUnwindSafe for Packets<'data, BUFFER_SIZE>

§

impl<'data, const BUFFER_SIZE: usize> Send for Packets<'data, BUFFER_SIZE>

§

impl<'data, const BUFFER_SIZE: usize> Sync for Packets<'data, BUFFER_SIZE>

§

impl<'data, const BUFFER_SIZE: usize> Unpin for Packets<'data, BUFFER_SIZE>

§

impl<'data, const BUFFER_SIZE: usize> UnsafeUnpin for Packets<'data, BUFFER_SIZE>

§

impl<'data, const BUFFER_SIZE: usize> UnwindSafe for Packets<'data, BUFFER_SIZE>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.