Struct rusty_leveldb::BloomPolicy
source · [−]pub struct BloomPolicy { /* private fields */ }
Expand description
A filter policy using a bloom filter internally.
Implementations
sourceimpl BloomPolicy
impl BloomPolicy
Beware the magic numbers…
sourcepub fn new(bits_per_key: u32) -> BloomPolicy
pub fn new(bits_per_key: u32) -> BloomPolicy
Returns a new boxed BloomPolicy.
Trait Implementations
sourceimpl Clone for BloomPolicy
impl Clone for BloomPolicy
sourcefn clone(&self) -> BloomPolicy
fn clone(&self) -> BloomPolicy
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl FilterPolicy for BloomPolicy
impl FilterPolicy for BloomPolicy
sourcefn create_filter(&self, keys: &[u8], key_offsets: &[usize]) -> Vec<u8>
fn create_filter(&self, keys: &[u8], key_offsets: &[usize]) -> Vec<u8>
Create a filter matching the given keys. Keys are given as a long byte array that is
indexed by the offsets contained in key_offsets. Read more
sourcefn key_may_match(&self, key: &[u8], filter: &[u8]) -> bool
fn key_may_match(&self, key: &[u8], filter: &[u8]) -> bool
Check whether the given key may match the filter.
Auto Trait Implementations
impl RefUnwindSafe for BloomPolicy
impl Send for BloomPolicy
impl Sync for BloomPolicy
impl Unpin for BloomPolicy
impl UnwindSafe for BloomPolicy
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more