pub trait Format<T> {
type Error: Error + 'static;
// Required method
fn read(&mut self, path: &Path) -> Result<Module<T>, Self::Error>;
}Available on crate feature
file only.Expand description
A file format.
This trait describes how to read and deserialize the contents of a file into a module.
Required Associated Types§
Sourcetype Error: Error + 'static
type Error: Error + 'static
Error for Format::read.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".