Trait FsTrait

Source
pub trait FsTrait:
    Send
    + Sync
    + 'static
    + Debug {
    // Required methods
    fn virtual_url(&self, url: &str) -> Option<Url>;
    fn read_file<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 Url,
    ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn write_file<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        url: &'life1 Url,
        content: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn lov_url(&self, url: &str, prefix: &str) -> Option<Url> { ... }
}

Required Methods§

Source

fn virtual_url(&self, url: &str) -> Option<Url>

Source

fn read_file<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 Url, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn write_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, url: &'life1 Url, content: &'life2 str, ) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

Source

fn lov_url(&self, url: &str, prefix: &str) -> Option<Url>

Implementors§