Trait Writer

Source
pub trait Writer {
    // Required methods
    fn write<E: ByteOrder>(
        self,
        id_type: IdType,
        content_type: impl Into<Ecc>,
        writer: &mut dyn Write,
    ) -> Result<()>;
    fn lazy_write<E: ByteOrder>(
        self,
        id_type: IdType,
        content_type: impl Into<Ecc>,
        writer: &mut dyn WriteSeek,
    ) -> Result<()>;
}
Expand description

Writer trait for HffDesc.

Required Methods§

Source

fn write<E: ByteOrder>( self, id_type: IdType, content_type: impl Into<Ecc>, writer: &mut dyn Write, ) -> Result<()>

Write to a stream.

Source

fn lazy_write<E: ByteOrder>( self, id_type: IdType, content_type: impl Into<Ecc>, writer: &mut dyn WriteSeek, ) -> Result<()>

Write to a stream but finalize chunk lazilly during the write. This requires a stream with both Write and Seek capabilities.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a> Writer for HffDesc<'a>