Struct bitcoin::bip158::BlockFilterWriter
source · pub struct BlockFilterWriter<'a, W> { /* private fields */ }
Expand description
Compiles and writes a block filter.
Implementations§
source§impl<'a, W: Write> BlockFilterWriter<'a, W>
impl<'a, W: Write> BlockFilterWriter<'a, W>
sourcepub fn new(writer: &'a mut W, block: &'a Block) -> BlockFilterWriter<'a, W>
pub fn new(writer: &'a mut W, block: &'a Block) -> BlockFilterWriter<'a, W>
Creates a new BlockFilterWriter
from block
.
sourcepub fn add_output_scripts(&mut self)
pub fn add_output_scripts(&mut self)
Adds output scripts of the block to filter (excluding OP_RETURN scripts).
sourcepub fn add_input_scripts<M, S>(
&mut self,
script_for_coin: M
) -> Result<(), Error>where
M: Fn(&OutPoint) -> Result<S, Error>,
S: Borrow<Script>,
pub fn add_input_scripts<M, S>( &mut self, script_for_coin: M ) -> Result<(), Error>where M: Fn(&OutPoint) -> Result<S, Error>, S: Borrow<Script>,
Adds consumed output scripts of a block to filter.
sourcepub fn add_element(&mut self, data: &[u8])
pub fn add_element(&mut self, data: &[u8])
Adds an arbitrary element to filter.
Auto Trait Implementations§
impl<'a, W> RefUnwindSafe for BlockFilterWriter<'a, W>where W: RefUnwindSafe,
impl<'a, W> Send for BlockFilterWriter<'a, W>where W: Send,
impl<'a, W> Sync for BlockFilterWriter<'a, W>where W: Sync,
impl<'a, W> Unpin for BlockFilterWriter<'a, W>
impl<'a, W> !UnwindSafe for BlockFilterWriter<'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