pub trait File: Into<String> + TryFrom<String> {
type ReadError;
type WriteError;
// Required methods
fn read<P>(path: P) -> Result<Self, Self::ReadError>
where P: Into<PathBuf>;
fn write<P>(self, path: P) -> Result<(), Self::WriteError>
where P: Into<PathBuf>;
}
Expand description
I/O file format trait.
Required Associated Types§
Sourcetype WriteError
type WriteError
Write format to path error.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.