Struct bitcoin_blockfilter::BlockFilter
source · pub struct BlockFilter { /* private fields */ }Expand description
| Complete block filter struct as defined | in BIP 157. Serialization matches payload | of “cfilter” messages. |
Implementations§
source§impl BlockFilter
impl BlockFilter
pub fn get_filter_type(&self) -> BlockFilterType
pub fn get_block_hash(&self) -> &u256
pub fn get_filter(&self) -> &GCSFilter
pub fn get_encoded_filter(&self) -> &Vec<u8>
pub fn serialize<Stream: StreamItems>(&self, s: &mut Stream)
pub fn unserialize<Stream: StreamInto>( &mut self, s: &mut Stream ) -> Result<(), StdException>
sourcepub fn new_from_parts(
filter_type: BlockFilterType,
block_hash: &u256,
filter: Vec<u8>
) -> Result<Self, StdException>
pub fn new_from_parts( filter_type: BlockFilterType, block_hash: &u256, filter: Vec<u8> ) -> Result<Self, StdException>
| Reconstruct a BlockFilter from parts. |
sourcepub fn new_from_block(
filter_type: BlockFilterType,
block: &Block,
block_undo: &BlockUndo
) -> Result<Self, StdException>
pub fn new_from_block( filter_type: BlockFilterType, block: &Block, block_undo: &BlockUndo ) -> Result<Self, StdException>
| Construct a new BlockFilter of the specified | type from a block. |
pub fn build_params(&self, params: &mut Params) -> bool
sourcepub fn compute_header(&self, prev_header: &u256) -> u256
pub fn compute_header(&self, prev_header: &u256) -> u256
| Compute the filter header given the | previous one. |
Trait Implementations§
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§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more