pub struct Page {
pub end: u64,
/* private fields */
}
Expand description
An OGG page
Fields§
§end: u64
The position in the stream the page ended
Implementations§
Source§impl Page
impl Page
Sourcepub fn header(&self) -> &PageHeader
pub fn header(&self) -> &PageHeader
Returns a reference to the Page
’s header
Sourcepub fn header_mut(&mut self) -> &mut PageHeader
pub fn header_mut(&mut self) -> &mut PageHeader
Returns a mutable reference to the Page
’s header
Sourcepub fn as_bytes(&self) -> Vec<u8> ⓘ
pub fn as_bytes(&self) -> Vec<u8> ⓘ
Convert the Page to bytes for writing
NOTE: This will write the checksum as is. It is likely Page::gen_crc
will have
to be used prior.
Sourcepub fn take_content(self) -> Vec<u8> ⓘ
pub fn take_content(self) -> Vec<u8> ⓘ
Consumes the page and returns its content
Trait Implementations§
impl Eq for Page
impl StructuralPartialEq for Page
Auto Trait Implementations§
impl Freeze for Page
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnwindSafe for Page
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more