Struct ogg_pager::PageHeader
source · pub struct PageHeader {
pub start: u64,
pub abgp: u64,
pub stream_serial: u32,
pub sequence_number: u32,
/* private fields */
}
Expand description
An OGG page header
Fields§
§start: u64
The position in the stream the page started at
abgp: u64
The page’s absolute granule position
stream_serial: u32
The page’s stream serial number
sequence_number: u32
The page’s sequence number
Implementations§
source§impl PageHeader
impl PageHeader
sourcepub const fn new(
header_type_flag: u8,
abgp: u64,
stream_serial: u32,
sequence_number: u32
) -> Self
pub const fn new(
header_type_flag: u8,
abgp: u64,
stream_serial: u32,
sequence_number: u32
) -> Self
Creates a new PageHeader
sourcepub fn read<R>(data: &mut R) -> Result<Self>where
R: Read + Seek,
pub fn read<R>(data: &mut R) -> Result<Self>where
R: Read + Seek,
Reads a PageHeader
from a reader
Errors
PageError::MissingMagic
PageError::InvalidVersion
PageError::BadSegmentCount
- Reader does not have enough data
sourcepub fn content_size(&self) -> usize
pub fn content_size(&self) -> usize
Returns the size of the page content, excluding the header
sourcepub fn header_type_flag(&self) -> u8
pub fn header_type_flag(&self) -> u8
Returns the page’s header type flag
Trait Implementations§
source§impl Clone for PageHeader
impl Clone for PageHeader
source§fn clone(&self) -> PageHeader
fn clone(&self) -> PageHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PageHeader
impl Debug for PageHeader
source§impl PartialEq<PageHeader> for PageHeader
impl PartialEq<PageHeader> for PageHeader
source§fn eq(&self, other: &PageHeader) -> bool
fn eq(&self, other: &PageHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.