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§
Sourcefn list_roots(&self) -> Vec<Root>
fn list_roots(&self) -> Vec<Root>
Lists all registered roots
Sourcefn remove_root(&mut self, path: &str) -> Result<()>
fn remove_root(&mut self, path: &str) -> Result<()>
Removes a root directory