pub trait CascFileSystem: Send + Sync {
// Required method
fn read_file(&self, file_id: u32) -> Option<Vec<u8>>;
// Provided methods
fn reserve_file_id(&self, _path: &str) -> Option<u32> { ... }
fn write_file(&self, _file_id: u32, _data: &[u8]) -> bool { ... }
fn file_exists(&self, file_id: u32) -> bool { ... }
}Expand description
A file system the library resolves by numeric data ID.
Required by the M2 parser and by CASC-backed asset loading.
Required Methods§
Provided Methods§
fn reserve_file_id(&self, _path: &str) -> Option<u32>
fn write_file(&self, _file_id: u32, _data: &[u8]) -> bool
fn file_exists(&self, file_id: u32) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".