[−][src]Struct ogg::Packet
Ogg packet representation.
For the Ogg format, packets are the logically smallest subdivision it handles.
Every packet belongs to a logical bitstream. The logical bitstreams then form a physical bitstream, with the data combined in multiple different ways.
Every logical bitstream is identified by the serial number its pages have stored. The Packet struct contains a field for that number as well, so that one can find out which logical bitstream the Packet belongs to.
Fields
data: Vec<u8>
The data the Packet
contains
Methods
impl Packet
[src]
pub fn first_in_page(&self) -> bool
[src]
Returns whether the packet is the first one starting in the page
pub fn first_in_stream(&self) -> bool
[src]
Returns whether the packet is the first one of the entire stream
pub fn last_in_page(&self) -> bool
[src]
Returns whether the packet is the last one starting in the page
pub fn last_in_stream(&self) -> bool
[src]
Returns whether the packet is the last one of the entire stream
pub fn absgp_page(&self) -> u64
[src]
Returns the absolute granule position of the page the packet ended in.
The meaning of the absolute granule position is defined by the codec.
pub fn stream_serial(&self) -> u32
[src]
Returns the serial number that uniquely identifies the logical bitstream.
Auto Trait Implementations
impl Unpin for Packet
impl Sync for Packet
impl Send for Packet
impl UnwindSafe for Packet
impl RefUnwindSafe for Packet
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,