pub trait FeffCodec: Sized {
const FORMAT: FileFormat;
// Required methods
fn decode(path: &Path, bytes: &[u8]) -> Result<Self, IoError>;
fn encode(&self) -> Result<Vec<u8>, IoError>;
// Provided methods
fn read_from(path: &Path, source: impl Read) -> Result<Self, IoError> { ... }
fn write_to(
&self,
path: &Path,
destination: impl Write,
) -> Result<(), IoError> { ... }
}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".