Struct riff::Chunk[][src]

pub struct Chunk {
    pub id: ChunkId,
    pub content: ChunkContent,
}

A chunk, also known as a form

Fields

The id of the chunk

The contents of the chunk

Methods

impl Chunk
[src]

Creates a new RIFF chunk.

Examples

let data_id = riff::ChunkId::new("test")?;
let riff_id = riff::ChunkId::new("foo ")?;
let data_chunk = riff::Chunk::new_data(data_id, vec![0x00, 0x00]);
let riff_chunk = riff::Chunk::new_list(riff_id, vec![data_chunk]);

Creates a new LIST chunk.

Examples

let data_id = riff::ChunkId::new("test")?;
let list_id = riff::ChunkId::new("foo ")?;
let data_chunk = riff::Chunk::new_data(data_id, vec![0x00, 0x00]);
let list_chunk = riff::Chunk::new_list(list_id, vec![data_chunk]);

Creates a new seqt chunk.

Examples

let data_id = riff::ChunkId::new("test")?;
let seqt_id = riff::ChunkId::new("foo ")?;
let data_chunk = riff::Chunk::new_data(data_id, vec![0x00, 0x00]);
let seqt_chunk = riff::Chunk::new_seqt(seqt_id, vec![data_chunk]);

Creates a new data chunk.

Examples

let id = riff::ChunkId::new("test")?;
let chunk = riff::Chunk::new_data(id, vec![0x00, 0x00]);

Trait Implementations

impl PartialEq for Chunk
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Chunk
[src]

impl Debug for Chunk
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Chunk

impl Sync for Chunk