Struct pearl::filter::hierarchical::HierarchicalFilters
source · pub struct HierarchicalFilters<Key, Filter, Child> { /* private fields */ }
Expand description
Container for types which is support bloom filtering
Implementations§
source§impl<Key, Filter, Child> HierarchicalFilters<Key, Filter, Child>where
Key: Sync + Send,
Child: BloomProvider<Key, Filter = Filter>,
Filter: FilterTrait<Key>,
impl<Key, Filter, Child> HierarchicalFilters<Key, Filter, Child>where Key: Sync + Send, Child: BloomProvider<Key, Filter = Filter>, Filter: FilterTrait<Key>,
source§impl<Key, Filter, Child> HierarchicalFilters<Key, Filter, Child>where
Key: Sync + Send,
Filter: FilterTrait<Key>,
impl<Key, Filter, Child> HierarchicalFilters<Key, Filter, Child>where Key: Sync + Send, Filter: FilterTrait<Key>,
sourcepub fn iter_possible_childs<'a>(
&'a self,
key: &'a Key
) -> PossibleRevIter<'a, Key, Filter, Child> ⓘ
pub fn iter_possible_childs<'a>( &'a self, key: &'a Key ) -> PossibleRevIter<'a, Key, Filter, Child> ⓘ
Iter over childs which may contain key
sourcepub fn iter_possible_childs_rev<'a>(
&'a self,
key: &'a Key
) -> PossibleRevIter<'a, Key, Filter, Child> ⓘ
pub fn iter_possible_childs_rev<'a>( &'a self, key: &'a Key ) -> PossibleRevIter<'a, Key, Filter, Child> ⓘ
Iter over childs which may contain key in reverse order
sourcepub fn add_to_parents(&self, child_id: ChildId, item: &Key)
pub fn add_to_parents(&self, child_id: ChildId, item: &Key)
Add key to all parents in collection
source§impl<Key, Filter, Child> HierarchicalFilters<Key, Filter, Child>
impl<Key, Filter, Child> HierarchicalFilters<Key, Filter, Child>
sourcepub fn get_child_mut(&mut self, id: ChildId) -> Option<&mut Leaf<Child>>
pub fn get_child_mut(&mut self, id: ChildId) -> Option<&mut Leaf<Child>>
Get mutable child by id
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Child>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Child>
Returns a iterator over the childs
sourcepub fn clear_and_get_values(&mut self) -> Vec<Child>
pub fn clear_and_get_values(&mut self) -> Vec<Child>
Clear container and return children values as Vec
Trait Implementations§
source§impl<Key, Filter, Child> BloomProvider<Key> for HierarchicalFilters<Key, Filter, Child>where
Key: Sync + Send,
Child: BloomProvider<Key>,
Filter: FilterTrait<Key>,
impl<Key, Filter, Child> BloomProvider<Key> for HierarchicalFilters<Key, Filter, Child>where Key: Sync + Send, Child: BloomProvider<Key>, Filter: FilterTrait<Key>,
source§fn check_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 Key
) -> Pin<Box<dyn Future<Output = FilterResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_filter<'life0, 'life1, 'async_trait>( &'life0 self, item: &'life1 Key ) -> Pin<Box<dyn Future<Output = FilterResult> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Check if element in filter
source§fn check_filter_fast(&self, item: &Key) -> FilterResult
fn check_filter_fast(&self, item: &Key) -> FilterResult
Check if element in filter
source§fn offload_buffer<'life0, 'async_trait>(
&'life0 mut self,
needed_memory: usize,
level: usize
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn offload_buffer<'life0, 'async_trait>( &'life0 mut self, needed_memory: usize, level: usize ) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns freed memory
source§fn get_filter<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Filter>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_filter<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Option<Filter>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns overall filter
source§fn filter_memory_allocated<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn filter_memory_allocated<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns allocated memory
source§fn get_filter_fast(&self) -> Option<&Filter>
fn get_filter_fast(&self) -> Option<&Filter>
Returns overall filter
source§impl<K, F, T> Debug for HierarchicalFilters<K, F, T>where
F: Debug,
impl<K, F, T> Debug for HierarchicalFilters<K, F, T>where F: Debug,
source§impl<Key, Filter, Child> IntoIterator for HierarchicalFilters<Key, Filter, Child>where
Key: Sync + Send,
Child: BloomProvider<Key>,
impl<Key, Filter, Child> IntoIterator for HierarchicalFilters<Key, Filter, Child>where Key: Sync + Send, Child: BloomProvider<Key>,
Auto Trait Implementations§
impl<Key, Filter, Child> RefUnwindSafe for HierarchicalFilters<Key, Filter, Child>where Child: RefUnwindSafe, Filter: RefUnwindSafe, Key: RefUnwindSafe,
impl<Key, Filter, Child> Send for HierarchicalFilters<Key, Filter, Child>where Child: Send, Filter: Send, Key: Send,
impl<Key, Filter, Child> Sync for HierarchicalFilters<Key, Filter, Child>where Child: Sync, Filter: Sync, Key: Sync,
impl<Key, Filter, Child> Unpin for HierarchicalFilters<Key, Filter, Child>where Child: Unpin, Filter: Unpin, Key: Unpin,
impl<Key, Filter, Child> UnwindSafe for HierarchicalFilters<Key, Filter, Child>where Child: UnwindSafe, Filter: UnwindSafe, Key: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more