Struct miniscript::DummyKey
source · pub struct DummyKey;
Expand description
Dummy key which de/serializes to the empty string; useful sometimes for testing
Trait Implementations
sourceimpl MiniscriptKey for DummyKey
impl MiniscriptKey for DummyKey
type Sha256 = DummySha256Hash
type Sha256 = DummySha256Hash
type Hash256 = DummyHash256Hash
type Hash256 = DummyHash256Hash
type Ripemd160 = DummyRipemd160Hash
type Ripemd160 = DummyRipemd160Hash
The associated [
ripedmd160::Hash
] for this MiniscriptKey
type.
used in the ripemd160 fragment Read moretype Hash160 = DummyHash160Hash
type Hash160 = DummyHash160Hash
sourcefn is_uncompressed(&self) -> bool
fn is_uncompressed(&self) -> bool
Returns true if the pubkey is uncompressed. Defaults to
false
.sourcefn is_x_only_key(&self) -> bool
fn is_x_only_key(&self) -> bool
Returns true if the pubkey is an x-only pubkey. Defaults to
false
.sourceimpl Ord for DummyKey
impl Ord for DummyKey
1.21.0 · sourcefn 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 · sourcefn 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
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<DummyKey> for DummyKey
impl PartialOrd<DummyKey> for DummyKey
sourcefn partial_cmp(&self, other: &DummyKey) -> Option<Ordering>
fn partial_cmp(&self, other: &DummyKey) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl ToPublicKey for DummyKey
impl ToPublicKey for DummyKey
sourcefn to_public_key(&self) -> PublicKey
fn to_public_key(&self) -> PublicKey
Converts an object to a public key
sourcefn to_sha256(_hash: &DummySha256Hash) -> Hash
fn to_sha256(_hash: &DummySha256Hash) -> Hash
Converts the generic associated
MiniscriptKey::Sha256
to [sha256::Hash
]sourcefn to_hash256(_hash: &DummyHash256Hash) -> Hash
fn to_hash256(_hash: &DummyHash256Hash) -> Hash
Converts the generic associated
MiniscriptKey::Hash256
to hash256::Hash
sourcefn to_ripemd160(_: &DummyRipemd160Hash) -> Hash
fn to_ripemd160(_: &DummyRipemd160Hash) -> Hash
Converts the generic associated
MiniscriptKey::Ripemd160
to [ripemd160::Hash
]sourcefn to_hash160(_: &DummyHash160Hash) -> Hash
fn to_hash160(_: &DummyHash160Hash) -> Hash
Converts the generic associated
MiniscriptKey::Hash160
to [hash160::Hash
]sourcefn to_x_only_pubkey(&self) -> XOnlyPublicKey
fn to_x_only_pubkey(&self) -> XOnlyPublicKey
Convert an object to x-only pubkey
sourcefn to_pubkeyhash(&self, sig_type: SigType) -> Hash
fn to_pubkeyhash(&self, sig_type: SigType) -> Hash
Obtain the public key hash for this MiniscriptKey
Expects an argument to specify the signature type.
This would determine whether to serialize the key as 32 byte x-only pubkey
or regular public key when computing the hash160 Read more
impl Copy for DummyKey
impl Eq for DummyKey
impl StructuralEq for DummyKey
impl StructuralPartialEq for DummyKey
Auto Trait Implementations
impl RefUnwindSafe for DummyKey
impl Send for DummyKey
impl Sync for DummyKey
impl Unpin for DummyKey
impl UnwindSafe for DummyKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more