Skip to main content

FileHandler

Trait FileHandler 

Source
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§

Source

fn can_handle(&self, path: &Path) -> bool

Source

fn get_content_type(&self, path: &Path) -> String

Source

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".

Implementors§