blf_lib-derivable 1.15.13

Shared traits used by blf_lib and blf_lib-derive
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::error::Error;
use std::io::Read;

pub mod chunks;
pub mod s_blf_header;

pub trait BlfFile {
    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 std::error::Error>> where Self: Sized;
    fn read(reader: &mut dyn Read) -> Result<Self, Box<dyn std::error::Error>> where Self: Sized;

}