pub trait NodeCache:
    Send
    + Sync
    + Debug
    + DynClone {
    // Required methods
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        node: &'life1 Node,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set<'life0, 'life1, 'async_trait>(
        &'life0 self,
        node: &'life1 Node,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    // Provided methods
    fn clear<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn name(&self) -> &'static str { ... }
}Expand description
Caches nodes, typically by their path and hash Recommended to namespace on the storage
For now just bool return value for easy filter
Required Methods§
fn get<'life0, 'life1, 'async_trait>(
    &'life0 self,
    node: &'life1 Node,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
    &'life0 self,
    node: &'life1 Node,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
Provided Methods§
Sourcefn clear<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn clear<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Optionally provide a method to clear the cache
fn name(&self) -> &'static str
Trait Implementations§
Source§impl NodeCache for &dyn NodeCache
 
impl NodeCache for &dyn NodeCache
fn get<'life0, 'life1, 'async_trait>(
    &'life0 self,
    node: &'life1 Node,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
    &'life0 self,
    node: &'life1 Node,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
Source§fn clear<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn clear<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Optionally provide a method to clear the cache
fn name(&self) -> &'static str
Source§impl NodeCache for Box<dyn NodeCache>
 
impl NodeCache for Box<dyn NodeCache>
fn get<'life0, 'life1, 'async_trait>(
    &'life0 self,
    node: &'life1 Node,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
    &'life0 self,
    node: &'life1 Node,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
Source§fn clear<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn clear<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Optionally provide a method to clear the cache