Struct bitcoin::bip158::GcsFilterWriter
source · pub struct GcsFilterWriter<'a, W> { /* private fields */ }
Expand description
Golomb-Rice encoded filter writer.
Implementations§
source§impl<'a, W: Write> GcsFilterWriter<'a, W>
impl<'a, W: Write> GcsFilterWriter<'a, W>
sourcepub fn new(
writer: &'a mut W,
k0: u64,
k1: u64,
m: u64,
p: u8
) -> GcsFilterWriter<'a, W>
pub fn new( writer: &'a mut W, k0: u64, k1: u64, m: u64, p: u8 ) -> GcsFilterWriter<'a, W>
Creates a new GcsFilterWriter
wrapping a generic writer, with specific seed to siphash.
sourcepub fn add_element(&mut self, element: &[u8])
pub fn add_element(&mut self, element: &[u8])
Adds data to the filter.
Auto Trait Implementations§
impl<'a, W> RefUnwindSafe for GcsFilterWriter<'a, W>where W: RefUnwindSafe,
impl<'a, W> Send for GcsFilterWriter<'a, W>where W: Send,
impl<'a, W> Sync for GcsFilterWriter<'a, W>where W: Sync,
impl<'a, W> Unpin for GcsFilterWriter<'a, W>
impl<'a, W> !UnwindSafe for GcsFilterWriter<'a, W>
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