Trait swiftide_core::indexing_traits::NodeCache
source · pub trait NodeCache:
Send
+ Sync
+ Debug {
// 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;
}
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