Struct ebml_iterable::TagWriter[][src]

pub struct TagWriter<W: Write> { /* fields omitted */ }
Expand description

Provides a tool to write EBML files based on Tags. Writes to a destination that implements std::io::Write.

Unlike the TagIterator, this does not require a specification to write data. The reason for this is that tags passed into this writer must provide the tag id, and these tags by necessity have their data in a format that can be encoded to binary. Because a specification is really only useful for providing context for tags based on the tag id, there is little value in using a specification during writing (other than ensuring that tag data matches the format described by the specification, which is not currently implemented.) The TagWriter can write any TagPosition objects regardless of whether they came from a TagIterator or not.

Example

use std::fs::File;
use ebml_iterable::TagWriter;
use ebml_iterable::tags::{TagPosition, TagData};

let mut file = File::create("my_ebml_file.ebml")?;
let mut my_writer = TagWriter::new(&mut file);
my_writer.write(TagPosition::FullTag(0x1a45dfa3, TagData::Master(Vec::new())))?;

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.