Trait RootManager

Source
pub trait RootManager: Send + Sync {
    // Required methods
    fn list_roots(&self) -> Vec<Root>;
    fn add_root(&mut self, root: Root) -> Result<()>;
    fn remove_root(&mut self, path: &str) -> Result<()>;
    fn get_context<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Root directory manager trait

Required Methods§

Source

fn list_roots(&self) -> Vec<Root>

Lists all registered roots

Source

fn add_root(&mut self, root: Root) -> Result<()>

Adds a new root directory

Source

fn remove_root(&mut self, path: &str) -> Result<()>

Removes a root directory

Source

fn get_context<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Gets context from a specific path within roots

Implementors§