pub struct WitnessCommitment(/* private fields */);Expand description
A hash corresponding to the witness structure commitment in the coinbase transaction.
Implementations§
Source§impl WitnessCommitment
impl WitnessCommitment
Sourcepub const GENESIS_PREVIOUS_BLOCK_HASH: Self
pub const GENESIS_PREVIOUS_BLOCK_HASH: Self
Dummy hash used as the previous blockhash of the genesis block.
§impl WitnessCommitment
impl WitnessCommitment
pub const fn from_byte_array(bytes: [u8; 32]) -> Self
pub const fn from_byte_array(bytes: [u8; 32]) -> Self
Constructs a new type from the underlying byte array.
pub const fn to_byte_array(self) -> [u8; 32]
pub const fn to_byte_array(self) -> [u8; 32]
Returns the underlying byte array.
pub const fn as_byte_array(&self) -> &[u8; 32]
pub const fn as_byte_array(&self) -> &[u8; 32]
Returns a reference to the underlying byte array.
Trait Implementations§
§impl<'a> Arbitrary<'a> for WitnessCommitment
Available on crate feature arbitrary only.
impl<'a> Arbitrary<'a> for WitnessCommitment
Available on crate feature
arbitrary only.§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read more§impl AsRef<[u8]> for WitnessCommitment
impl AsRef<[u8]> for WitnessCommitment
§impl AsRef<[u8; 32]> for WitnessCommitment
impl AsRef<[u8; 32]> for WitnessCommitment
§impl Borrow<[u8]> for WitnessCommitment
impl Borrow<[u8]> for WitnessCommitment
§impl Borrow<[u8; 32]> for WitnessCommitment
impl Borrow<[u8; 32]> for WitnessCommitment
Source§impl Clone for WitnessCommitment
impl Clone for WitnessCommitment
Source§fn clone(&self) -> WitnessCommitment
fn clone(&self) -> WitnessCommitment
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 WitnessCommitment
impl Debug for WitnessCommitment
§impl<'de> Deserialize<'de> for WitnessCommitment
impl<'de> Deserialize<'de> for WitnessCommitment
§fn deserialize<D: Deserializer<'de>>(
d: D,
) -> Result<WitnessCommitment, D::Error>
fn deserialize<D: Deserializer<'de>>( d: D, ) -> Result<WitnessCommitment, D::Error>
Deserialize this value from the given Serde deserializer. Read more
§impl Display for WitnessCommitment
Available on crate feature hex only.
impl Display for WitnessCommitment
Available on crate feature
hex only.§impl FromStr for WitnessCommitment
Available on crate feature hex only.
impl FromStr for WitnessCommitment
Available on crate feature
hex only.Source§impl Hash for WitnessCommitment
impl Hash for WitnessCommitment
§impl LowerHex for WitnessCommitment
Available on crate feature hex only.
impl LowerHex for WitnessCommitment
Available on crate feature
hex only.Source§impl Ord for WitnessCommitment
impl Ord for WitnessCommitment
Source§fn cmp(&self, other: &WitnessCommitment) -> Ordering
fn cmp(&self, other: &WitnessCommitment) -> 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 WitnessCommitment
impl PartialEq for WitnessCommitment
Source§impl PartialOrd for WitnessCommitment
impl PartialOrd for WitnessCommitment
§impl Serialize for WitnessCommitment
impl Serialize for WitnessCommitment
§impl UpperHex for WitnessCommitment
Available on crate feature hex only.
impl UpperHex for WitnessCommitment
Available on crate feature
hex only.impl Copy for WitnessCommitment
impl Eq for WitnessCommitment
impl StructuralPartialEq for WitnessCommitment
Auto Trait Implementations§
impl Freeze for WitnessCommitment
impl RefUnwindSafe for WitnessCommitment
impl Send for WitnessCommitment
impl Sync for WitnessCommitment
impl Unpin for WitnessCommitment
impl UnsafeUnpin for WitnessCommitment
impl UnwindSafe for WitnessCommitment
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