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 GROESTLCOIN: Self
pub const GROESTLCOIN: Self
ChainHash for mainnet groestlcoin.
Sourcepub const fn using_genesis_block(network: Network) -> Self
pub const fn using_genesis_block(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
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ChainHash
Available on crate feature
serde only.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 FromHex for ChainHash
impl FromHex for ChainHash
Source§type Err = HexToArrayError
type Err = HexToArrayError
Error type returned while parsing hex string.
Source§fn from_byte_iter<I>(iter: I) -> Result<Self, HexToArrayError>
fn from_byte_iter<I>(iter: I) -> Result<Self, HexToArrayError>
Produces an object from a byte iterator.
Source§impl Ord for ChainHash
impl Ord for ChainHash
Source§impl PartialOrd for ChainHash
impl PartialOrd 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§
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