Struct bitcoin::bip158::BlockFilter
source · pub struct BlockFilter {
pub content: Vec<u8>,
}
Expand description
A block filter, as described by BIP 158.
Fields§
§content: Vec<u8>
Golomb encoded filter
Implementations§
source§impl BlockFilter
impl BlockFilter
sourcepub fn new(content: &[u8]) -> BlockFilter
pub fn new(content: &[u8]) -> BlockFilter
Creates a new filter from pre-computed data.
sourcepub fn new_script_filter<M, S>(
block: &Block,
script_for_coin: M
) -> Result<BlockFilter, Error>where
M: Fn(&OutPoint) -> Result<S, Error>,
S: Borrow<Script>,
pub fn new_script_filter<M, S>( block: &Block, script_for_coin: M ) -> Result<BlockFilter, Error>where M: Fn(&OutPoint) -> Result<S, Error>, S: Borrow<Script>,
Computes a SCRIPT_FILTER that contains spent and output scripts.
sourcepub fn filter_header(
&self,
previous_filter_header: &FilterHeader
) -> FilterHeader
pub fn filter_header( &self, previous_filter_header: &FilterHeader ) -> FilterHeader
Computes this filter’s ID in a chain of filters (see BIP 157).
Trait Implementations§
source§impl Clone for BlockFilter
impl Clone for BlockFilter
source§fn clone(&self) -> BlockFilter
fn clone(&self) -> BlockFilter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BlockFilter
impl Debug for BlockFilter
source§impl PartialEq<BlockFilter> for BlockFilter
impl PartialEq<BlockFilter> for BlockFilter
source§fn eq(&self, other: &BlockFilter) -> bool
fn eq(&self, other: &BlockFilter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for BlockFilter
impl StructuralEq for BlockFilter
impl StructuralPartialEq for BlockFilter
Auto Trait Implementations§
impl RefUnwindSafe for BlockFilter
impl Send for BlockFilter
impl Sync for BlockFilter
impl Unpin for BlockFilter
impl UnwindSafe for BlockFilter
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