pub struct Sign2ContractHash(/* private fields */);Expand description
Tagged hash used for nonce tweaking for BIP-0340 (Schnorr) signatures.
Implementations§
Source§impl Sign2ContractHash
impl Sign2ContractHash
Sourcepub const fn from_byte_array(
bytes: <Hash<Sign2ContractTag> as Hash>::Bytes,
) -> Self
pub const fn from_byte_array( bytes: <Hash<Sign2ContractTag> as Hash>::Bytes, ) -> Self
Constructs a new hash from the underlying byte array.
Sourcepub fn from_slice(sl: &[u8]) -> Result<Sign2ContractHash, FromSliceError>
👎Deprecated since 0.15.0: use from_byte_array instead
pub fn from_slice(sl: &[u8]) -> Result<Sign2ContractHash, FromSliceError>
use from_byte_array instead
Copies a byte slice into a hash object.
Sourcepub const fn to_byte_array(self) -> <Hash<Sign2ContractTag> as Hash>::Bytes
pub const fn to_byte_array(self) -> <Hash<Sign2ContractTag> as Hash>::Bytes
Returns the underlying byte array.
Sourcepub const fn as_byte_array(&self) -> &<Hash<Sign2ContractTag> as Hash>::Bytes
pub const fn as_byte_array(&self) -> &<Hash<Sign2ContractTag> as Hash>::Bytes
Returns a reference to the underlying byte array.
Trait Implementations§
Source§impl AsRef<[u8]> for Sign2ContractHash
impl AsRef<[u8]> for Sign2ContractHash
Source§impl Borrow<[u8]> for Sign2ContractHash
impl Borrow<[u8]> for Sign2ContractHash
Source§impl Clone for Sign2ContractHash
impl Clone for Sign2ContractHash
impl Copy for Sign2ContractHash
Source§impl Debug for Sign2ContractHash
impl Debug for Sign2ContractHash
impl Eq for Sign2ContractHash
Source§impl From<Hash<Sign2ContractTag>> for Sign2ContractHash
impl From<Hash<Sign2ContractTag>> for Sign2ContractHash
Source§fn from(inner: Hash<Sign2ContractTag>) -> Sign2ContractHash
fn from(inner: Hash<Sign2ContractTag>) -> Sign2ContractHash
Converts to this type from the input type.
Source§impl From<Sign2ContractHash> for Hash<Sign2ContractTag>
impl From<Sign2ContractHash> for Hash<Sign2ContractTag>
Source§fn from(hashtype: Sign2ContractHash) -> Hash<Sign2ContractTag>
fn from(hashtype: Sign2ContractHash) -> Hash<Sign2ContractTag>
Converts to this type from the input type.
Source§impl Hash for Sign2ContractHash
impl Hash for Sign2ContractHash
Source§impl Hash for Sign2ContractHash
impl Hash for Sign2ContractHash
Source§const DISPLAY_BACKWARD: bool = <sha256t::Hash<Sign2ContractTag> as ::bitcoin_hashes::Hash>::DISPLAY_BACKWARD
const DISPLAY_BACKWARD: bool = <sha256t::Hash<Sign2ContractTag> as ::bitcoin_hashes::Hash>::DISPLAY_BACKWARD
Flag indicating whether user-visible serializations of this hash should be backward. Read more
Source§type Bytes = <Hash<Sign2ContractTag> as Hash>::Bytes
type Bytes = <Hash<Sign2ContractTag> 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<Sign2ContractHash, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<Sign2ContractHash, 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 Sign2ContractHash
impl Ord for Sign2ContractHash
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 Sign2ContractHash
impl PartialEq for Sign2ContractHash
Source§impl PartialOrd for Sign2ContractHash
impl PartialOrd for Sign2ContractHash
impl StructuralPartialEq for Sign2ContractHash
Source§impl TweakHash for Sign2ContractHash
impl TweakHash for Sign2ContractHash
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 Sign2ContractHash
impl RefUnwindSafe for Sign2ContractHash
impl Send for Sign2ContractHash
impl Sync for Sign2ContractHash
impl Unpin for Sign2ContractHash
impl UnsafeUnpin for Sign2ContractHash
impl UnwindSafe for Sign2ContractHash
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