pub struct Pay2ContractHash(/* private fields */);Expand description
Tagged hash used for key tweaking for x-only keys.
Implementations§
Source§impl Pay2ContractHash
impl Pay2ContractHash
Sourcepub const fn from_byte_array(
bytes: <Hash<Pay2ContractTag> as Hash>::Bytes,
) -> Self
pub const fn from_byte_array( bytes: <Hash<Pay2ContractTag> as Hash>::Bytes, ) -> Self
Constructs a new hash from the underlying byte array.
Sourcepub fn from_slice(sl: &[u8]) -> Result<Pay2ContractHash, FromSliceError>
👎Deprecated since 0.15.0: use from_byte_array instead
pub fn from_slice(sl: &[u8]) -> Result<Pay2ContractHash, FromSliceError>
use from_byte_array instead
Copies a byte slice into a hash object.
Sourcepub const fn to_byte_array(self) -> <Hash<Pay2ContractTag> as Hash>::Bytes
pub const fn to_byte_array(self) -> <Hash<Pay2ContractTag> as Hash>::Bytes
Returns the underlying byte array.
Sourcepub const fn as_byte_array(&self) -> &<Hash<Pay2ContractTag> as Hash>::Bytes
pub const fn as_byte_array(&self) -> &<Hash<Pay2ContractTag> as Hash>::Bytes
Returns a reference to the underlying byte array.
Trait Implementations§
Source§impl AsRef<[u8]> for Pay2ContractHash
impl AsRef<[u8]> for Pay2ContractHash
Source§impl Borrow<[u8]> for Pay2ContractHash
impl Borrow<[u8]> for Pay2ContractHash
Source§impl Clone for Pay2ContractHash
impl Clone for Pay2ContractHash
impl Copy for Pay2ContractHash
Source§impl Debug for Pay2ContractHash
impl Debug for Pay2ContractHash
impl Eq for Pay2ContractHash
Source§impl From<Hash<Pay2ContractTag>> for Pay2ContractHash
impl From<Hash<Pay2ContractTag>> for Pay2ContractHash
Source§fn from(inner: Hash<Pay2ContractTag>) -> Pay2ContractHash
fn from(inner: Hash<Pay2ContractTag>) -> Pay2ContractHash
Converts to this type from the input type.
Source§impl From<Pay2ContractHash> for Hash<Pay2ContractTag>
impl From<Pay2ContractHash> for Hash<Pay2ContractTag>
Source§fn from(hashtype: Pay2ContractHash) -> Hash<Pay2ContractTag>
fn from(hashtype: Pay2ContractHash) -> Hash<Pay2ContractTag>
Converts to this type from the input type.
Source§impl Hash for Pay2ContractHash
impl Hash for Pay2ContractHash
Source§impl Hash for Pay2ContractHash
impl Hash for Pay2ContractHash
Source§const DISPLAY_BACKWARD: bool = <sha256t::Hash<Pay2ContractTag> as ::bitcoin_hashes::Hash>::DISPLAY_BACKWARD
const DISPLAY_BACKWARD: bool = <sha256t::Hash<Pay2ContractTag> as ::bitcoin_hashes::Hash>::DISPLAY_BACKWARD
Flag indicating whether user-visible serializations of this hash should be backward. Read more
Source§type Bytes = <Hash<Pay2ContractTag> as Hash>::Bytes
type Bytes = <Hash<Pay2ContractTag> as Hash>::Bytes
The byte array that represents the hash internally.
Source§fn from_byte_array(bytes: Self::Bytes) -> Self
fn from_byte_array(bytes: Self::Bytes) -> Self
Constructs a new hash from the underlying byte array.
Source§fn from_slice(sl: &[u8]) -> Result<Pay2ContractHash, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<Pay2ContractHash, FromSliceError>
👎Deprecated since 0.15.0:
use from_byte_array instead
Copies 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 Ord for Pay2ContractHash
impl Ord for Pay2ContractHash
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Pay2ContractHash
impl PartialEq for Pay2ContractHash
Source§impl PartialOrd for Pay2ContractHash
impl PartialOrd for Pay2ContractHash
Source§impl PubkeyTweakHash for Pay2ContractHash
impl PubkeyTweakHash for Pay2ContractHash
Source§type SignatureTweakHash = Sign2ContractHash
type SignatureTweakHash = Sign2ContractHash
The commitment type t
impl StructuralPartialEq for Pay2ContractHash
Source§impl TweakHash for Pay2ContractHash
impl TweakHash for Pay2ContractHash
Source§type AllowedKeys = XOnly
type AllowedKeys = XOnly
Whether to work with full keys and ECDSA signatures or x-only keys and
BIP-0340 (Schnorr) signatures. Read more
Auto Trait Implementations§
impl Freeze for Pay2ContractHash
impl RefUnwindSafe for Pay2ContractHash
impl Send for Pay2ContractHash
impl Sync for Pay2ContractHash
impl Unpin for Pay2ContractHash
impl UnsafeUnpin for Pay2ContractHash
impl UnwindSafe for Pay2ContractHash
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