[−][src]Struct riff::Chunk
A chunk, also known as a form
Implementations
impl Chunk
[src]
pub fn id(&self) -> ChunkId
[src]
Returns the ChunkId
of this chunk.
pub fn len(&self) -> u32
[src]
Returns the number of bytes in this chunk.
pub fn offset(&self) -> u64
[src]
Returns the offset of this chunk from the start of the stream.
pub fn read_type<T>(&self, stream: &mut T) -> Result<ChunkId> where
T: Read + Seek,
[src]
T: Read + Seek,
Reads the chunk type of this chunk.
Generally only valid for RIFF
and LIST
chunks.
pub fn read<T>(stream: &mut T, pos: u64) -> Result<Chunk> where
T: Read + Seek,
[src]
T: Read + Seek,
Reads a chunk from the specified position in the stream.
pub fn read_contents<T>(&self, stream: &mut T) -> Result<Vec<u8>> where
T: Read + Seek,
[src]
T: Read + Seek,
Reads the entirety of the contents of a chunk.
pub fn iter<'a, T>(&self, stream: &'a mut T) -> Iter<'a, T>ⓘ where
T: Seek + Read,
[src]
T: Seek + Read,
Returns an iterator over the children of the chunk.
If the chunk has children but is noncompliant, e.g. it has
no type identifier (like seqt
chunks), use iter_no_type
instead.
pub fn iter_no_type<'a, T>(&self, stream: &'a mut T) -> Iter<'a, T>ⓘ where
T: Seek + Read,
[src]
T: Seek + Read,
Returns an iterator over the chilren of the chunk. Only valid for
noncompliant chunks that have children but no chunk type identifier
(like seqt
chunks).
Trait Implementations
impl Debug for Chunk
[src]
impl Eq for Chunk
[src]
impl PartialEq<Chunk> for Chunk
[src]
impl StructuralEq for Chunk
[src]
impl StructuralPartialEq for Chunk
[src]
Auto Trait Implementations
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnwindSafe for Chunk
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> 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>,