Skip to main content

PageBloomFilter

Struct PageBloomFilter 

Source
pub struct PageBloomFilter<const W: u8> { /* private fields */ }

Implementations§

Source§

impl<const W: u8> PageBloomFilter<W>

Source

pub fn from_estimate(item: usize, fpr: f32) -> Self

Source

pub fn new(page_level: u8, page_num: u32) -> Self

Source

pub fn recover(page_level: u8, data: &[u8], unique_cnt: usize) -> Self

Trait Implementations§

Source§

impl BloomFilter for PageBloomFilter<4>

Source§

fn get_way(&self) -> u8

Source§

fn get_page_level(&self) -> u8

Source§

fn get_page_num(&self) -> u32

Source§

fn get_unique_cnt(&self) -> usize

Source§

fn get_data(&self) -> &[u8] ⓘ

Source§

fn capacity(&self) -> usize

Source§

fn virtual_capacity(&self, fpr: f32) -> usize

Source§

fn clear(&mut self)

Source§

fn valid(&self) -> bool

Source§

fn set(&mut self, key: &[u8]) -> bool

Source§

fn test(&self, key: &[u8]) -> bool

Source§

impl BloomFilter for PageBloomFilter<5>

Source§

fn get_way(&self) -> u8

Source§

fn get_page_level(&self) -> u8

Source§

fn get_page_num(&self) -> u32

Source§

fn get_unique_cnt(&self) -> usize

Source§

fn get_data(&self) -> &[u8] ⓘ

Source§

fn capacity(&self) -> usize

Source§

fn virtual_capacity(&self, fpr: f32) -> usize

Source§

fn clear(&mut self)

Source§

fn valid(&self) -> bool

Source§

fn set(&mut self, key: &[u8]) -> bool

Source§

fn test(&self, key: &[u8]) -> bool

Source§

impl BloomFilter for PageBloomFilter<6>

Source§

fn get_way(&self) -> u8

Source§

fn get_page_level(&self) -> u8

Source§

fn get_page_num(&self) -> u32

Source§

fn get_unique_cnt(&self) -> usize

Source§

fn get_data(&self) -> &[u8] ⓘ

Source§

fn capacity(&self) -> usize

Source§

fn virtual_capacity(&self, fpr: f32) -> usize

Source§

fn clear(&mut self)

Source§

fn valid(&self) -> bool

Source§

fn set(&mut self, key: &[u8]) -> bool

Source§

fn test(&self, key: &[u8]) -> bool

Source§

impl BloomFilter for PageBloomFilter<7>

Source§

fn get_way(&self) -> u8

Source§

fn get_page_level(&self) -> u8

Source§

fn get_page_num(&self) -> u32

Source§

fn get_unique_cnt(&self) -> usize

Source§

fn get_data(&self) -> &[u8] ⓘ

Source§

fn capacity(&self) -> usize

Source§

fn virtual_capacity(&self, fpr: f32) -> usize

Source§

fn clear(&mut self)

Source§

fn valid(&self) -> bool

Source§

fn set(&mut self, key: &[u8]) -> bool

Source§

fn test(&self, key: &[u8]) -> bool

Source§

impl BloomFilter for PageBloomFilter<8>

Source§

fn get_way(&self) -> u8

Source§

fn get_page_level(&self) -> u8

Source§

fn get_page_num(&self) -> u32

Source§

fn get_unique_cnt(&self) -> usize

Source§

fn get_data(&self) -> &[u8] ⓘ

Source§

fn capacity(&self) -> usize

Source§

fn virtual_capacity(&self, fpr: f32) -> usize

Source§

fn clear(&mut self)

Source§

fn valid(&self) -> bool

Source§

fn set(&mut self, key: &[u8]) -> bool

Source§

fn test(&self, key: &[u8]) -> bool

Auto Trait Implementations§

§

impl<const W: u8> Freeze for PageBloomFilter<W>

§

impl<const W: u8> RefUnwindSafe for PageBloomFilter<W>

§

impl<const W: u8> Send for PageBloomFilter<W>

§

impl<const W: u8> Sync for PageBloomFilter<W>

§

impl<const W: u8> Unpin for PageBloomFilter<W>

§

impl<const W: u8> UnsafeUnpin for PageBloomFilter<W>

§

impl<const W: u8> UnwindSafe for PageBloomFilter<W>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.