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 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§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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