pub struct FilterHeader(/* private fields */);Expand description
Filter header, as defined in BIP-157
Implementations§
Source§impl FilterHeader
impl FilterHeader
Sourcepub fn from_raw_hash(inner: Hash) -> FilterHeader
pub fn from_raw_hash(inner: Hash) -> FilterHeader
Creates this wrapper type from the inner hash type.
Sourcepub fn to_raw_hash(self) -> Hash
pub fn to_raw_hash(self) -> Hash
Returns the inner hash (sha256, sh256d etc.).
Sourcepub 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§
Source§impl AsRef<[u8]> for FilterHeader
impl AsRef<[u8]> for FilterHeader
Source§impl Borrow<[u8]> for FilterHeader
impl Borrow<[u8]> for FilterHeader
Source§impl Clone for FilterHeader
impl Clone for FilterHeader
Source§fn clone(&self) -> FilterHeader
fn clone(&self) -> FilterHeader
Returns a duplicate 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 FilterHeader
impl Debug for FilterHeader
Source§impl Decodable for FilterHeader
impl Decodable for FilterHeader
Source§fn consensus_decode<R>(r: &mut R) -> Result<FilterHeader, Error>
fn consensus_decode<R>(r: &mut R) -> Result<FilterHeader, Error>
Decode an object with a well-defined format. Read more
Source§impl<'de> Deserialize<'de> for FilterHeader
impl<'de> Deserialize<'de> for FilterHeader
Source§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
Source§impl Display for FilterHeader
impl Display for FilterHeader
Source§impl Encodable for FilterHeader
impl Encodable for FilterHeader
Source§impl From<FilterHeader> for Hash
impl From<FilterHeader> for Hash
Source§fn from(hashtype: FilterHeader) -> Hash
fn from(hashtype: FilterHeader) -> Hash
Converts to this type from the input type.
Source§impl From<Hash> for FilterHeader
impl From<Hash> for FilterHeader
Source§fn from(inner: Hash) -> FilterHeader
fn from(inner: Hash) -> FilterHeader
Converts to this type from the input type.
Source§impl FromStr for FilterHeader
impl FromStr for FilterHeader
Source§type Err = HexToArrayError
type Err = HexToArrayError
The associated error which can be returned from parsing.
Source§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 moreSource§impl Hash for FilterHeader
impl Hash for FilterHeader
Source§impl Hash for FilterHeader
impl Hash for FilterHeader
Source§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.Source§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.Source§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.
Source§fn from_slice(sl: &[u8]) -> Result<FilterHeader, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<FilterHeader, FromSliceError>
Copies a byte slice into a hash object.
Source§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.
Source§fn to_byte_array(self) -> <FilterHeader as Hash>::Bytes
fn to_byte_array(self) -> <FilterHeader as Hash>::Bytes
Returns the underlying byte array.
Source§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.
Source§fn all_zeros() -> FilterHeader
fn all_zeros() -> FilterHeader
Returns an all zero hash. Read more
Source§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.
Source§impl<I> Index<I> for FilterHeaderwhere
I: SliceIndex<[u8]>,
impl<I> Index<I> for FilterHeaderwhere
I: SliceIndex<[u8]>,
Source§impl LowerHex for FilterHeader
impl LowerHex for FilterHeader
Source§impl Ord for FilterHeader
impl Ord for FilterHeader
Source§fn cmp(&self, other: &FilterHeader) -> Ordering
fn cmp(&self, other: &FilterHeader) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FilterHeader
impl PartialEq for FilterHeader
Source§impl PartialOrd for FilterHeader
impl PartialOrd for FilterHeader
Source§impl SerdeHash for FilterHeader
impl SerdeHash for FilterHeader
Source§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.
Source§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.
Source§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.
Source§impl Serialize for FilterHeader
impl Serialize for FilterHeader
Source§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
Source§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> Base32Len for T
impl<T> Base32Len for T
Source§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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
Source§impl<T> CheckBase32<Vec<u5>> for T
impl<T> CheckBase32<Vec<u5>> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> ToBase32 for T
impl<T> ToBase32 for T
Source§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
Encode as base32 and write it to the supplied writer
Implementations shouldn’t allocate.
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)