pub trait BlfFile {
// Required methods
fn write(&mut self) -> Result<Vec<u8>, Box<dyn Error>>;
fn write_file(
&mut self,
path: impl Into<String>,
) -> Result<(), Box<dyn Error>>;
fn read_file(path: &String) -> Result<Self, Box<dyn Error>>
where Self: Sized;
fn read(reader: &mut dyn Read) -> Result<Self, Box<dyn Error>>
where Self: Sized;
}Required Methods§
fn write(&mut self) -> Result<Vec<u8>, Box<dyn Error>>
fn write_file(&mut self, path: impl Into<String>) -> Result<(), Box<dyn Error>>
fn read_file(path: &String) -> Result<Self, Box<dyn Error>>where
Self: Sized,
fn read(reader: &mut dyn Read) -> Result<Self, Box<dyn Error>>where
Self: Sized,
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.