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 fn from_byte_array(bytes: <Hash as Hash>::Bytes) -> Self
pub const fn from_byte_array(bytes: <Hash as Hash>::Bytes) -> Self
Constructs a hash from the underlying byte array.
Sourcepub fn from_slice(sl: &[u8]) -> Result<WitnessCommitment, FromSliceError>
👎Deprecated since 0.15.0: use from_byte_array
instead
pub fn from_slice(sl: &[u8]) -> Result<WitnessCommitment, FromSliceError>
from_byte_array
insteadCopies a byte slice into a hash object.
Sourcepub const fn to_byte_array(self) -> <Hash as Hash>::Bytes
pub const fn to_byte_array(self) -> <Hash as Hash>::Bytes
Returns the underlying byte array.
Sourcepub const fn as_byte_array(&self) -> &<Hash as Hash>::Bytes
pub const fn as_byte_array(&self) -> &<Hash as Hash>::Bytes
Returns a reference to the underlying byte array.
Trait Implementations§
Source§impl AsRef<[u8]> for WitnessCommitment
impl AsRef<[u8]> for WitnessCommitment
Source§impl Borrow<[u8]> for WitnessCommitment
impl Borrow<[u8]> 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
Source§impl<'de> Deserialize<'de> for WitnessCommitment
impl<'de> Deserialize<'de> for WitnessCommitment
Source§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
Source§impl Display for WitnessCommitment
impl Display for WitnessCommitment
Source§impl From<Hash> for WitnessCommitment
impl From<Hash> for WitnessCommitment
Source§fn from(inner: Hash) -> WitnessCommitment
fn from(inner: Hash) -> WitnessCommitment
Converts to this type from the input type.
Source§impl From<WitnessCommitment> for Hash
impl From<WitnessCommitment> for Hash
Source§fn from(hashtype: WitnessCommitment) -> Hash
fn from(hashtype: WitnessCommitment) -> Hash
Converts to this type from the input type.
Source§impl FromStr for WitnessCommitment
impl FromStr for WitnessCommitment
Source§impl Hash for WitnessCommitment
impl Hash for WitnessCommitment
Source§impl Hash for WitnessCommitment
impl Hash for WitnessCommitment
Source§const DISPLAY_BACKWARD: bool = true
const DISPLAY_BACKWARD: bool = true
Flag indicating whether user-visible serializations of this hash should be backward. Read more
Source§fn from_byte_array(bytes: Self::Bytes) -> Self
fn from_byte_array(bytes: Self::Bytes) -> Self
Constructs a hash from the underlying byte array.
Source§fn from_slice(sl: &[u8]) -> Result<WitnessCommitment, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<WitnessCommitment, FromSliceError>
👎Deprecated since 0.15.0: use
from_byte_array
insteadCopies a byte slice into a hash object.
Source§fn to_byte_array(self) -> Self::Bytes
fn to_byte_array(self) -> Self::Bytes
Returns the underlying byte array.
Source§fn as_byte_array(&self) -> &Self::Bytes
fn as_byte_array(&self) -> &Self::Bytes
Returns a reference to the underlying byte array.
Source§impl LowerHex for WitnessCommitment
impl LowerHex for WitnessCommitment
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
Source§impl Serialize for WitnessCommitment
impl Serialize for WitnessCommitment
Source§impl UpperHex for WitnessCommitment
impl UpperHex for WitnessCommitment
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 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