Struct object_lib::collections::pcuckoo::PCuckooFilter
source · #[repr(C)]pub struct PCuckooFilter {
associativity: usize,
num_buckets: usize,
bits_per_item: usize,
table: PCuckooFilterTable,
num_items: usize,
/* private fields */
}Fields§
§associativity: usize§num_buckets: usize§bits_per_item: usize§table: PCuckooFilterTable§num_items: usizeImplementations§
source§impl PCuckooFilter
impl PCuckooFilter
pub fn new(max_num_keys: usize, bits_per_item: usize) -> Self
fn tag_hash(&self, item_hash: u64) -> u32
fn index_hash(&self, item_hash: u32) -> u32
fn hash_item<T>(&self, item: T) -> (u32, u32)where T: Hash,
fn alt_index(&self, index: u32, tag: u32) -> u32
pub fn allocate_table(&mut self)
pub fn reset(&mut self)
fn add_internal(&mut self, index: u32, tag: u32) -> Status
pub fn add<T>(&mut self, item: T) -> Statuswhere T: Hash,
pub fn contains<T>(&self, item: T) -> boolwhere T: Hash,
pub fn delete(&mut self, item: u32) -> Status
pub fn load_factor(&self) -> f64
Trait Implementations§
source§impl Persistable for PCuckooFilter
impl Persistable for PCuckooFilter
source§impl PersistentlyAllocatable for PCuckooFilter
impl PersistentlyAllocatable for PCuckooFilter
fn set_allocator(&mut self, allocator: Arc<RwLock<BumpAllocator>>)
fn get_allocator(&self) -> Option<Arc<RwLock<BumpAllocator>>>
Auto Trait Implementations§
impl !RefUnwindSafe for PCuckooFilter
impl Send for PCuckooFilter
impl Sync for PCuckooFilter
impl Unpin for PCuckooFilter
impl !UnwindSafe for PCuckooFilter
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