Struct bdk_chain::bitcoin::FilterHeader
pub struct FilterHeader(/* private fields */);
Expand description
Filter header, as defined in BIP-157
Implementations§
§impl FilterHeader
impl FilterHeader
pub fn from_raw_hash(inner: Hash) -> FilterHeader
pub fn from_raw_hash(inner: Hash) -> FilterHeader
Creates this wrapper type from the inner hash type.
pub fn to_raw_hash(self) -> Hash
pub fn to_raw_hash(self) -> Hash
Returns the inner hash (sha256, sh256d etc.).
pub fn as_raw_hash(&self) -> &Hash
pub fn as_raw_hash(&self) -> &Hash
Returns a reference to the inner hash (sha256, sh256d etc.).
Trait Implementations§
§impl AsRef<[u8]> for FilterHeader
impl AsRef<[u8]> for FilterHeader
§impl AsRef<[u8; 32]> for FilterHeader
impl AsRef<[u8; 32]> for FilterHeader
§impl Borrow<[u8]> for FilterHeader
impl Borrow<[u8]> for FilterHeader
§impl Clone for FilterHeader
impl Clone for FilterHeader
§fn clone(&self) -> FilterHeader
fn clone(&self) -> FilterHeader
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 more§impl Debug for FilterHeader
impl Debug for FilterHeader
§impl Decodable for FilterHeader
impl Decodable for FilterHeader
§impl<'de> Deserialize<'de> for FilterHeader
impl<'de> Deserialize<'de> for FilterHeader
§fn deserialize<D>(d: D) -> Result<FilterHeader, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<FilterHeader, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for FilterHeader
impl Display for FilterHeader
§impl Encodable for FilterHeader
impl Encodable for FilterHeader
§impl From<FilterHeader> for Hash
impl From<FilterHeader> for Hash
§fn from(hashtype: FilterHeader) -> Hash
fn from(hashtype: FilterHeader) -> Hash
Converts to this type from the input type.
§impl From<Hash> for FilterHeader
impl From<Hash> for FilterHeader
§fn from(inner: Hash) -> FilterHeader
fn from(inner: Hash) -> FilterHeader
Converts to this type from the input type.
§impl FromStr for FilterHeader
impl FromStr for FilterHeader
§type Err = HexToArrayError
type Err = HexToArrayError
The associated error which can be returned from parsing.
§fn from_str(s: &str) -> Result<FilterHeader, <FilterHeader as FromStr>::Err>
fn from_str(s: &str) -> Result<FilterHeader, <FilterHeader as FromStr>::Err>
Parses a string
s
to return a value of this type. Read more§impl Hash for FilterHeader
impl Hash for FilterHeader
§type Engine = <Hash as Hash>::Engine
type Engine = <Hash as Hash>::Engine
A hashing engine which bytes can be serialized into. It is expected
to implement the
io::Write
trait, and to never return errors under
any conditions.§const DISPLAY_BACKWARD: bool = true
const DISPLAY_BACKWARD: bool = true
Flag indicating whether user-visible serializations of this hash
should be backward. For some reason Satoshi decided this should be
true for
Sha256dHash
, so here we are.§fn engine() -> <FilterHeader as Hash>::Engine
fn engine() -> <FilterHeader as Hash>::Engine
Constructs a new engine.
§fn from_engine(e: <FilterHeader as Hash>::Engine) -> FilterHeader
fn from_engine(e: <FilterHeader as Hash>::Engine) -> FilterHeader
Produces a hash from the current state of a given engine.
§fn from_slice(sl: &[u8]) -> Result<FilterHeader, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<FilterHeader, FromSliceError>
Copies a byte slice into a hash object.
§fn from_byte_array(bytes: <FilterHeader as Hash>::Bytes) -> FilterHeader
fn from_byte_array(bytes: <FilterHeader as Hash>::Bytes) -> FilterHeader
Constructs a hash from the underlying byte array.
§fn to_byte_array(self) -> <FilterHeader as Hash>::Bytes
fn to_byte_array(self) -> <FilterHeader as Hash>::Bytes
Returns the underlying byte array.
§fn as_byte_array(&self) -> &<FilterHeader as Hash>::Bytes
fn as_byte_array(&self) -> &<FilterHeader as Hash>::Bytes
Returns a reference to the underlying byte array.
§fn all_zeros() -> FilterHeader
fn all_zeros() -> FilterHeader
Returns an all zero hash. Read more
§fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
Hashes all the byte slices retrieved from the iterator together.
§impl Hash for FilterHeader
impl Hash for FilterHeader
§impl<I> Index<I> for FilterHeaderwhere
I: SliceIndex<[u8]>,
impl<I> Index<I> for FilterHeaderwhere
I: SliceIndex<[u8]>,
§impl LowerHex for FilterHeader
impl LowerHex for FilterHeader
§impl Ord for FilterHeader
impl Ord for FilterHeader
§impl PartialEq for FilterHeader
impl PartialEq for FilterHeader
§fn eq(&self, other: &FilterHeader) -> bool
fn eq(&self, other: &FilterHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for FilterHeader
impl PartialOrd for FilterHeader
§fn partial_cmp(&self, other: &FilterHeader) -> Option<Ordering>
fn partial_cmp(&self, other: &FilterHeader) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl SerdeHash for FilterHeader
impl SerdeHash for FilterHeader
§fn from_slice_delegated(sl: &[u8]) -> Result<FilterHeader, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<FilterHeader, FromSliceError>
Helper function to turn a deserialized slice into the correct hash type.
§fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Do serde serialization.
§fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Do serde deserialization.
§impl Serialize for FilterHeader
impl Serialize for FilterHeader
§fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl UpperHex for FilterHeader
impl UpperHex for FilterHeader
impl Copy for FilterHeader
impl Eq for FilterHeader
impl StructuralPartialEq for FilterHeader
Auto Trait Implementations§
impl Freeze for FilterHeader
impl RefUnwindSafe for FilterHeader
impl Send for FilterHeader
impl Sync for FilterHeader
impl Unpin for FilterHeader
impl UnwindSafe for FilterHeader
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more