#[non_exhaustive]pub enum Salt {
None,
Known(u32),
Find(usize),
}Expand description
How to obtain the .kvei index salt.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
No salt: do not use the bloom filter. Lookups stay correct (exact .bt search),
just without the negative-lookup speedup.
Known(u32)
A known salt (e.g. from salt-state.txt, big-endian u32).
Find(usize)
Brute-force the salt by requiring a batch of real keys to all hit the bloom,
using usize worker threads. The ~1% per-key false-positive rate makes a wrong
salt passing every sampled key astronomically unlikely, so the first salt that
passes is the real one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Salt
impl RefUnwindSafe for Salt
impl Send for Salt
impl Sync for Salt
impl Unpin for Salt
impl UnsafeUnpin for Salt
impl UnwindSafe for Salt
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