pub trait FeffCodec: Sized {
const FORMAT: FileFormat;
// Required methods
fn decode(path: &Path, bytes: &[u8]) -> Result<Self>;
fn encode(&self) -> Result<Vec<u8>>;
// Provided methods
fn read_from(path: &Path, source: impl Read) -> Result<Self> { ... }
fn write_to(&self, path: &Path, destination: impl Write) -> Result<()> { ... }
}Expand description
Codec implemented by typed FEFF input/output models.
Required Associated Constants§
Sourceconst FORMAT: FileFormat
const FORMAT: FileFormat
Registered format represented by this type.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".