Struct ChainHash
pub struct ChainHash(/* private fields */);
Expand description
The uniquely identifying hash of the target blockchain.
Implementations§
§impl ChainHash
impl ChainHash
pub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Converts the object to a mutable raw pointer.
§impl ChainHash
impl ChainHash
pub const TESTNET: ChainHash
👎Deprecated since 0.32.4: Use TESTNET3 instead
pub const TESTNET: ChainHash
ChainHash
for testnet3 bitcoin.
pub fn using_genesis_block(params: impl AsRef<Params>) -> ChainHash
pub fn using_genesis_block(params: impl AsRef<Params>) -> ChainHash
Returns the hash of the network
genesis block for use as a chain hash.
See BOLT 0 for specification.
pub const fn using_genesis_block_const(network: Network) -> ChainHash
pub const fn using_genesis_block_const(network: Network) -> ChainHash
Returns the hash of the network
genesis block for use as a chain hash.
See BOLT 0 for specification.
pub fn from_genesis_block_hash(block_hash: BlockHash) -> ChainHash
pub fn from_genesis_block_hash(block_hash: BlockHash) -> ChainHash
Converts genesis block hash into ChainHash
.
Trait Implementations§
§impl BorrowMut<[u8]> for ChainHash
impl BorrowMut<[u8]> for ChainHash
§fn borrow_mut(&mut self) -> &mut [u8] ⓘ
fn borrow_mut(&mut self) -> &mut [u8] ⓘ
Mutably borrows from an owned value. Read more
§impl BorrowMut<[u8; 32]> for ChainHash
impl BorrowMut<[u8; 32]> for ChainHash
§fn borrow_mut(&mut self) -> &mut [u8; 32]
fn borrow_mut(&mut self) -> &mut [u8; 32]
Mutably borrows from an owned value. Read more
§impl<'de> Deserialize<'de> for ChainHash
impl<'de> Deserialize<'de> for ChainHash
§fn deserialize<D>(d: D) -> Result<ChainHash, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<ChainHash, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Ord for ChainHash
impl Ord for ChainHash
§impl PartialOrd for ChainHash
impl PartialOrd for ChainHash
§impl Serialize for ChainHash
impl Serialize for ChainHash
§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 Writeable for ChainHash
impl Writeable for ChainHash
impl Copy for ChainHash
impl Eq for ChainHash
impl StructuralPartialEq for ChainHash
Auto Trait Implementations§
impl Freeze for ChainHash
impl RefUnwindSafe for ChainHash
impl Send for ChainHash
impl Sync for ChainHash
impl Unpin for ChainHash
impl UnwindSafe for ChainHash
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> Base32Len for T
impl<T> Base32Len for T
§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
§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,
§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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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
§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
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<T> MaybeReadable for Twhere
T: Readable,
impl<T> MaybeReadable for Twhere
T: Readable,
§impl<T> ToBase32 for T
impl<T> ToBase32 for T
§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
)