pub trait FileApi {
type File;
// Required methods
fn open(&mut self, filename: &Path) -> Option<Self::File>;
fn read(file: &mut Self::File, buf: &mut [u8]) -> bool;
fn seek(file: &mut Self::File, pos: SeekFrom) -> bool;
fn tell(file: &mut Self::File) -> Option<u64>;
}Expand description
The file reading API
Application can provide its own File API to override default. For example, this may be useful in cases when soundfonts isn’t located in the file system.
Required Associated Types§
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.