[−][src]Struct rust_cascade::Cascade
A multi-level cascading Bloom filter.
Methods
impl<'a> Cascade<'a>
[src]
pub fn from_bytes(bytes: &'a [u8]) -> Result<Option<Box<Cascade<'a>>>, Error>
[src]
Attempts to decode and return a multi-level cascading Bloom filter. NB: Cascade
does not
take ownership of the given data. This is to facilitate decoding cascading filters
backed by memory-mapped files.
Arguments
bytes
- The encoded representation of the Bloom filters in this cascade. Starts with 2
little endian bytes indicating the version. The current version is 2. The Python
filter-cascade project defines the formats, see
https://github.com/mozilla/filter-cascade/blob/v0.3.0/filtercascade/fileformats.py
May be of length 0, in which case None
is returned.
pub fn has(&self, entry: &[u8]) -> bool
[src]
Determine if the given sequence of bytes is in the cascade.
Arguments
entry
- The slice of bytes to test for
pub fn has_internal(&self, entry: &[u8]) -> bool
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Cascade<'a>
impl<'a> Send for Cascade<'a>
impl<'a> Sync for Cascade<'a>
impl<'a> Unpin for Cascade<'a>
impl<'a> UnwindSafe for Cascade<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,