Skip to main content

ChunkEncoder

Trait ChunkEncoder 

Source
pub trait ChunkEncoder {
    // Required method
    fn encode_chunk(&self) -> Result<EncodedChunk, EncodeError>;
}
Expand description

A value that can be serialized into a single DjVu chunk.

Implementors pair a chunk id with a payload encoder and route every fallible case through EncodeError.

Required Methods§

Source

fn encode_chunk(&self) -> Result<EncodedChunk, EncodeError>

Encode self into its (id, payload) chunk.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§