pub struct ChainHash(/* private fields */);
Expand description
The uniquely identifying hash of the target blockchain.
Implementations§
source§impl ChainHash
impl ChainHash
sourcepub 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.
source§impl ChainHash
impl ChainHash
sourcepub const TESTNET: Self = _
👎Deprecated since 0.32.4: Use TESTNET3 instead
pub const TESTNET: Self = _
ChainHash
for testnet3 bitcoin.
sourcepub fn using_genesis_block(params: impl AsRef<Params>) -> Self
pub fn using_genesis_block(params: impl AsRef<Params>) -> Self
Returns the hash of the network
genesis block for use as a chain hash.
See BOLT 0 for specification.
sourcepub const fn using_genesis_block_const(network: Network) -> Self
pub const fn using_genesis_block_const(network: Network) -> Self
Returns the hash of the network
genesis block for use as a chain hash.
See BOLT 0 for specification.
sourcepub fn from_genesis_block_hash(block_hash: BlockHash) -> Self
pub fn from_genesis_block_hash(block_hash: BlockHash) -> Self
Converts genesis block hash into ChainHash
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ChainHash
impl<'de> Deserialize<'de> for ChainHash
source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<ChainHash, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<ChainHash, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for ChainHash
impl Ord for ChainHash
source§impl PartialEq<ChainHash> for ChainHash
impl PartialEq<ChainHash> for ChainHash
source§impl PartialOrd<ChainHash> for ChainHash
impl PartialOrd<ChainHash> for ChainHash
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 moreimpl Copy for ChainHash
impl Eq for ChainHash
impl StructuralEq for ChainHash
impl StructuralPartialEq for ChainHash
Auto Trait Implementations§
impl RefUnwindSafe for ChainHash
impl Send for ChainHash
impl Sync for ChainHash
impl Unpin for ChainHash
impl UnwindSafe for ChainHash
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