Skip to main content

Encode

Trait Encode 

Source
pub trait Encode: Format {
    // Required method
    fn encode(&self, asset: &Self::Asset) -> Vec<u8> ⓘ;
}
Expand description

A format that can also write its kind: what tools and an optimized format derived from a source (ADR-0007 §4) use.

Required Methods§

Source

fn encode(&self, asset: &Self::Asset) -> Vec<u8> ⓘ

asset as this format’s bytes. Decoding them gives an asset equal to asset.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§