Trait ethcore_util::bloom::Bloomable
[−]
[src]
pub trait Bloomable: Sized + Default + DerefMut<Target=[u8]> { fn shift_bloomed<'a, T>(&'a mut self, b: &T) -> &'a mut Self where T: Bloomable; fn from_bloomed<T>(b: &T) -> Self where T: Bloomable; fn bloom_part<T>(&self, m: usize) -> T where T: Bloomable; fn contains_bloomed<T>(&self, b: &T) -> bool where T: Bloomable; fn with_bloomed<T>(self, b: &T) -> Self where T: Bloomable { ... } }
Bloom operations.
Required Methods
fn shift_bloomed<'a, T>(&'a mut self, b: &T) -> &'a mut Self where T: Bloomable
When interpreting self as a bloom output, augment (bit-wise OR) with the a bloomed version of b
.
fn from_bloomed<T>(b: &T) -> Self where T: Bloomable
Construct new instance equal to the bloomed value of b
.
fn bloom_part<T>(&self, m: usize) -> T where T: Bloomable
Bloom the current value using the bloom parameter m
.
fn contains_bloomed<T>(&self, b: &T) -> bool where T: Bloomable
Check to see whether this hash, interpreted as a bloom, contains the value b
when bloomed.
Provided Methods
fn with_bloomed<T>(self, b: &T) -> Self where T: Bloomable
Same as shift_bloomed
except that self
is consumed and a new value returned.