pub trait FileHandler: Send + Sync {
// Required methods
fn can_handle(&self, path: &Path) -> bool;
fn get_content_type(&self, path: &Path) -> String;
fn handle_file(&self, path: &Path) -> Result<Vec<u8>>;
}Required Methods§
fn can_handle(&self, path: &Path) -> bool
fn get_content_type(&self, path: &Path) -> String
fn handle_file(&self, path: &Path) -> Result<Vec<u8>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".