Trait FileEngine

Source
pub trait FileEngine {
    // Required methods
    fn files(&self) -> Vec<String>;
    fn file_size<'life0, 'life1, 'async_trait>(
        &'life0 self,
        file: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Option<u64>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn read_file<'life0, 'life1, 'async_trait>(
        &'life0 self,
        file: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn read_file_to_string<'life0, 'life1, 'async_trait>(
        &'life0 self,
        file: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Option<String>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_native_file<'life0, 'life1, 'async_trait>(
        &'life0 self,
        file: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Option<Box<dyn Any>>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn files(&self) -> Vec<String>

Source

fn file_size<'life0, 'life1, 'async_trait>( &'life0 self, file: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<u64>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn read_file<'life0, 'life1, 'async_trait>( &'life0 self, file: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn read_file_to_string<'life0, 'life1, 'async_trait>( &'life0 self, file: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<String>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_native_file<'life0, 'life1, 'async_trait>( &'life0 self, file: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<Box<dyn Any>>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§