pub struct Chunk { /* private fields */ }
Expand description
A chunk, also known as a form
Implementations§
Source§impl Chunk
impl Chunk
Sourcepub fn read_type<T>(&self, stream: &mut T) -> Result<ChunkId>
pub fn read_type<T>(&self, stream: &mut T) -> Result<ChunkId>
Reads the chunk type of this chunk.
Generally only valid for RIFF
and LIST
chunks.
Sourcepub fn read<T>(stream: &mut T, pos: u64) -> Result<Chunk>
pub fn read<T>(stream: &mut T, pos: u64) -> Result<Chunk>
Reads a chunk from the specified position in the stream.
Sourcepub fn read_contents<T>(&self, stream: &mut T) -> Result<Vec<u8>>
pub fn read_contents<T>(&self, stream: &mut T) -> Result<Vec<u8>>
Reads the entirety of the contents of a chunk.
Trait Implementations§
impl Eq for Chunk
impl StructuralPartialEq for Chunk
Auto Trait Implementations§
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnwindSafe for Chunk
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