pub trait Encoder: Send + Sync {
// Required method
fn encode(&self, cx: &mut WriteCx<'_>, expr: &Expr) -> Result<Output>;
}Expand description
The core encode contract: render a kernel Expr to Output.
Every codec that can write implements Encoder. The WriteCx carries the
kernel context, the codec id, and the EncodeOptions
that fix the output position and fidelity.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".