Struct bdk::descriptor::Miniscript [−][src]
pub struct Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey, { pub node: Terminal<Pk, Ctx>, pub ty: Type, pub ext: ExtData, // some fields omitted }
Expand description
Top-level script AST type
Fields
node: Terminal<Pk, Ctx>
Expand description
A node in the Abstract Syntax Tree(
ty: Type
Expand description
The correctness and malleability type information for the AST node
ext: ExtData
Expand description
Additional information helpful for extra analysis.
Implementations
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]pub fn requires_sig(&self) -> bool
[src]
pub fn requires_sig(&self) -> bool
[src]Whether all spend paths of miniscript require a signature
pub fn is_non_malleable(&self) -> bool
[src]
pub fn is_non_malleable(&self) -> bool
[src]Whether the miniscript is malleable
pub fn within_resource_limits(&self) -> bool
[src]
pub fn within_resource_limits(&self) -> bool
[src]Whether the miniscript can exceed the resource limits(Opcodes, Stack limit etc)
pub fn has_mixed_timelocks(&self) -> bool
[src]
pub fn has_mixed_timelocks(&self) -> bool
[src]Whether the miniscript contains a combination of timelocks
pub fn has_repeated_keys(&self) -> bool
[src]
pub fn has_repeated_keys(&self) -> bool
[src]Whether the miniscript has repeated Pk or Pkh
pub fn sanity_check(&self) -> Result<(), AnalysisError>
[src]
pub fn sanity_check(&self) -> Result<(), AnalysisError>
[src]Check whether the underlying Miniscript is safe under the current context Lifting these polices would create a semantic representation that does not represent the underlying semantics when miniscript is spent. Signing logic may not find satisfaction even if one exists.
For most cases, users should be dealing with safe scripts. Use this function to check whether the guarantees of library hold. Most functions of the library like would still work, but results cannot be relied upon
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]Iterator-related extensions for Miniscript
pub fn iter(&self) -> Iter<'_, Pk, Ctx>
[src]
pub fn iter(&self) -> Iter<'_, Pk, Ctx>
[src]Creates a new Iter iterator that will iterate over all Miniscript items within AST by traversing its branches. For the specific algorithm please see Iter::next function.
pub fn iter_pk(&self) -> PkIter<'_, Pk, Ctx>
[src]
pub fn iter_pk(&self) -> PkIter<'_, Pk, Ctx>
[src]Creates a new PkIter iterator that will iterate over all plain public keys (and not key hash values) present in Miniscript items within AST by traversing all its branches. For the specific algorithm please see PkIter::next function.
pub fn iter_pkh(&self) -> PkhIter<'_, Pk, Ctx>
[src]
pub fn iter_pkh(&self) -> PkhIter<'_, Pk, Ctx>
[src]Creates a new PkhIter iterator that will iterate over all public keys hashes (and not plain public keys) present in Miniscript items within AST by traversing all its branches. For the specific algorithm please see PkhIter::next function.
pub fn iter_pk_pkh(&self) -> PkPkhIter<'_, Pk, Ctx>
[src]
pub fn iter_pk_pkh(&self) -> PkPkhIter<'_, Pk, Ctx>
[src]Creates a new PkPkhIter iterator that will iterate over all plain public keys and key hash values present in Miniscript items within AST by traversing all its branches. For the specific algorithm please see PkPkhIter::next function.
pub fn branches(&self) -> Vec<&Miniscript<Pk, Ctx>, Global>
[src]
pub fn branches(&self) -> Vec<&Miniscript<Pk, Ctx>, Global>
[src]Enumerates all child nodes of the current AST node (self
) and returns a Vec
referencing
them.
pub fn get_nth_child(&self, n: usize) -> Option<&Miniscript<Pk, Ctx>>
[src]
pub fn get_nth_child(&self, n: usize) -> Option<&Miniscript<Pk, Ctx>>
[src]Returns child node with given index, if any
pub fn get_leaf_pk(&self) -> Vec<Pk, Global>
[src]
pub fn get_leaf_pk(&self) -> Vec<Pk, Global>
[src]Returns Vec
with cloned version of all public keys from the current miniscript item,
if any. Otherwise returns an empty Vec
.
NB: The function analyzes only single miniscript item and not any of its descendants in AST.
To obtain a list of all public keys within AST use Miniscript::iter_pk() function, for example
miniscript.iter_pubkeys().collect()
.
pub fn get_leaf_pkh(&self) -> Vec<<Pk as MiniscriptKey>::Hash, Global>
[src]
pub fn get_leaf_pkh(&self) -> Vec<<Pk as MiniscriptKey>::Hash, Global>
[src]Returns Vec
with hashes of all public keys from the current miniscript item, if any.
Otherwise returns an empty Vec
.
For each public key the function computes hash; for each hash of the public key the function returns its cloned copy.
NB: The function analyzes only single miniscript item and not any of its descendants in AST.
To obtain a list of all public key hashes within AST use Miniscript::iter_pkh() function,
for example miniscript.iter_pubkey_hashes().collect()
.
pub fn get_leaf_pk_pkh(&self) -> Vec<PkPkh<Pk>, Global>
[src]
pub fn get_leaf_pk_pkh(&self) -> Vec<PkPkh<Pk>, Global>
[src]Returns Vec
of PkPkh entries, representing either public keys or public key
hashes, depending on the data from the current miniscript item. If there is no public
keys or hashes, the function returns an empty Vec
.
NB: The function analyzes only single miniscript item and not any of its descendants in AST.
To obtain a list of all public keys or hashes within AST use Miniscript::iter_pk_pkh()
function, for example miniscript.iter_pubkeys_and_hashes().collect()
.
pub fn get_nth_pk(&self, n: usize) -> Option<Pk>
[src]
pub fn get_nth_pk(&self, n: usize) -> Option<Pk>
[src]Returns Option::Some
with cloned n’th public key from the current miniscript item,
if any. Otherwise returns Option::None
.
NB: The function analyzes only single miniscript item and not any of its descendants in AST.
pub fn get_nth_pkh(&self, n: usize) -> Option<<Pk as MiniscriptKey>::Hash>
[src]
pub fn get_nth_pkh(&self, n: usize) -> Option<<Pk as MiniscriptKey>::Hash>
[src]Returns Option::Some
with hash of n’th public key from the current miniscript item,
if any. Otherwise returns Option::None
.
For each public key the function computes hash; for each hash of the public key the function returns it cloned copy.
NB: The function analyzes only single miniscript item and not any of its descendants in AST.
pub fn get_nth_pk_pkh(&self, n: usize) -> Option<PkPkh<Pk>>
[src]
pub fn get_nth_pk_pkh(&self, n: usize) -> Option<PkPkh<Pk>>
[src]Returns Option::Some
with hash of n’th public key or hash from the current miniscript item,
if any. Otherwise returns Option::None
.
NB: The function analyzes only single miniscript item and not any of its descendants in AST.
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]impl<Ctx> Miniscript<PublicKey, Ctx> where
Ctx: ScriptContext,
[src]
impl<Ctx> Miniscript<PublicKey, Ctx> where
Ctx: ScriptContext,
[src]pub fn parse_insane(
script: &Script
) -> Result<Miniscript<PublicKey, Ctx>, Error>
[src]
pub fn parse_insane(
script: &Script
) -> Result<Miniscript<PublicKey, Ctx>, Error>
[src]Attempt to parse an insane(scripts don’t clear sanity checks) script into a Miniscript representation. Use this to parse scripts with repeated pubkeys, timelock mixing, malleable scripts without sig or scripts that can exceed resource limits. Some of the analysis guarantees of miniscript are lost when dealing with insane scripts. In general, in a multi-party setting users should only accept sane scripts.
pub fn parse(script: &Script) -> Result<Miniscript<PublicKey, Ctx>, Error>
[src]
pub fn parse(script: &Script) -> Result<Miniscript<PublicKey, Ctx>, Error>
[src]Attempt to parse a Script into Miniscript representation. This function will fail parsing for scripts that do not clear the Miniscript::sanity_check checks. Use Miniscript::parse_insane to parse such scripts.
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]pub fn encode(&self) -> Script where
Pk: ToPublicKey,
[src]
pub fn encode(&self) -> Script where
Pk: ToPublicKey,
[src]Encode as a Bitcoin script
pub fn script_size(&self) -> usize
[src]
pub fn script_size(&self) -> usize
[src]Size, in bytes of the script-pubkey. If this Miniscript is used outside of segwit (e.g. in a bare or P2SH descriptor), this quantity should be multiplied by 4 to compute the weight.
In general, it is not recommended to use this function directly, but
to instead call the corresponding function on a Descriptor
, which
will handle the segwit/non-segwit technicalities for you.
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]pub fn max_satisfaction_witness_elements(&self) -> Result<usize, Error>
[src]
pub fn max_satisfaction_witness_elements(&self) -> Result<usize, Error>
[src]Maximum number of witness elements used to satisfy the Miniscript
fragment, including the witness script itself. Used to estimate
the weight of the VarInt
that specifies this number in a serialized
transaction.
This function may returns Error when the Miniscript is impossible to satisfy
pub fn max_satisfaction_size(&self) -> Result<usize, Error>
[src]
pub fn max_satisfaction_size(&self) -> Result<usize, Error>
[src]Maximum size, in bytes, of a satisfying witness. For Segwit outputs
one_cost
should be set to 2, since the number 1
requires two
bytes to encode. For non-segwit outputs one_cost
should be set to
1, since OP_1
is available in scriptSigs.
In general, it is not recommended to use this function directly, but
to instead call the corresponding function on a Descriptor
, which
will handle the segwit/non-segwit technicalities for you.
All signatures are assumed to be 73 bytes in size, including the length prefix (segwit) or push opcode (pre-segwit) and sighash postfix.
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]pub fn from_str_insane(s: &str) -> Result<Miniscript<Pk, Ctx>, Error> where
Pk: FromStr,
<Pk as MiniscriptKey>::Hash: FromStr,
<Pk as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash as FromStr>::Err: ToString,
[src]
pub fn from_str_insane(s: &str) -> Result<Miniscript<Pk, Ctx>, Error> where
Pk: FromStr,
<Pk as MiniscriptKey>::Hash: FromStr,
<Pk as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash as FromStr>::Err: ToString,
[src]Attempt to parse an insane(scripts don’t clear sanity checks) from string into a Miniscript representation. Use this to parse scripts with repeated pubkeys, timelock mixing, malleable scripts without sig or scripts that can exceed resource limits. Some of the analysis guarantees of miniscript are lost when dealing with insane scripts. In general, in a multi-party setting users should only accept sane scripts.
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]pub fn lift_check(&self) -> Result<(), LiftError>
[src]
pub fn lift_check(&self) -> Result<(), LiftError>
[src]Lifting corresponds conversion of miniscript into Policy [policy.semantic.Policy] for human readable or machine analysis. However, naively lifting miniscripts can result in incorrect interpretations that don’t correspond underlying semantics when we try to spend them on bitcoin network. This can occur if the miniscript contains a
- Timelock combination
- Contains a spend that exceeds resource limits
Trait Implementations
impl<Pk, Ctx> Clone for Miniscript<Pk, Ctx> where
Ctx: Clone + ScriptContext,
Pk: Clone + MiniscriptKey,
[src]
impl<Pk, Ctx> Clone for Miniscript<Pk, Ctx> where
Ctx: Clone + ScriptContext,
Pk: Clone + MiniscriptKey,
[src]pub fn clone(&self) -> Miniscript<Pk, Ctx>
[src]
pub fn clone(&self) -> Miniscript<Pk, Ctx>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<Pk, Ctx> Debug for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Debug for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]impl<Pk, Ctx> Display for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Display for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]impl<Ctx: ScriptContext> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
[src]
impl<Ctx: ScriptContext> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
[src]fn extract_policy(
&self,
signers: &SignersContainer,
build_sat: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, Error>
[src]
fn extract_policy(
&self,
signers: &SignersContainer,
build_sat: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, Error>
[src]Extract the spending policy
impl<Pk, Ctx> ForEachKey<Pk> for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> ForEachKey<Pk> for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]pub fn for_each_key<'a, F>(&'a self, pred: F) -> bool where
F: FnMut(ForEach<'a, Pk>) -> bool,
Pk: 'a,
<Pk as MiniscriptKey>::Hash: 'a,
[src]
pub fn for_each_key<'a, F>(&'a self, pred: F) -> bool where
F: FnMut(ForEach<'a, Pk>) -> bool,
Pk: 'a,
<Pk as MiniscriptKey>::Hash: 'a,
[src]Run a predicate on every key in the descriptor, returning whether the predicate returned true for every key Read more
fn for_any_key<'a, F>(&'a self, pred: F) -> bool where
F: FnMut(ForEach<'a, Pk>) -> bool,
Pk: 'a,
<Pk as MiniscriptKey>::Hash: 'a,
[src]
fn for_any_key<'a, F>(&'a self, pred: F) -> bool where
F: FnMut(ForEach<'a, Pk>) -> bool,
Pk: 'a,
<Pk as MiniscriptKey>::Hash: 'a,
[src]Run a predicate on every key in the descriptor, returning whether the predicate returned true for any key Read more
impl<Pk, Ctx> FromStr for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Hash: FromStr,
<Pk as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash as FromStr>::Err: ToString,
[src]
impl<Pk, Ctx> FromStr for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Hash: FromStr,
<Pk as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash as FromStr>::Err: ToString,
[src]Parse a Miniscript from string and perform sanity checks See Miniscript::from_str_insane to parse scripts from string that do not clear the Miniscript::sanity_check checks.
impl<Pk, Ctx> FromTree for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Hash: FromStr,
<Pk as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash as FromStr>::Err: ToString,
[src]
impl<Pk, Ctx> FromTree for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Hash: FromStr,
<Pk as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash as FromStr>::Err: ToString,
[src]impl<Pk, Ctx> Hash for Miniscript<Pk, Ctx> where
Ctx: Hash + ScriptContext,
Pk: Hash + MiniscriptKey,
[src]
impl<Pk, Ctx> Hash for Miniscript<Pk, Ctx> where
Ctx: Hash + ScriptContext,
Pk: Hash + MiniscriptKey,
[src]impl<Pk, Ctx> Liftable<Pk> for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Liftable<Pk> for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]impl<Pk, Ctx> Ord for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> Ord for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]Ord
of Miniscript
must depend only on node and not the type information.
The type information and extra_properties can be deterministically determined
by the ast.
impl<Pk, Ctx> PartialEq<Miniscript<Pk, Ctx>> for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> PartialEq<Miniscript<Pk, Ctx>> for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]PartialEq
of Miniscript
must depend only on node and not the type information.
The type information and extra_properties can be deterministically determined
by the ast.
impl<Pk, Ctx> PartialOrd<Miniscript<Pk, Ctx>> for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Ctx> PartialOrd<Miniscript<Pk, Ctx>> for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]PartialOrd
of Miniscript
must depend only on node and not the type information.
The type information and extra_properties can be deterministically determined
by the ast.
pub fn partial_cmp(&self, other: &Miniscript<Pk, Ctx>) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &Miniscript<Pk, Ctx>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<Pk, Q, Ctx> TranslatePk<Pk, Q> for Miniscript<Pk, Ctx> where
Q: MiniscriptKey,
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
impl<Pk, Q, Ctx> TranslatePk<Pk, Q> for Miniscript<Pk, Ctx> where
Q: MiniscriptKey,
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]pub fn translate_pk<FPk, FPkh, FuncError>(
&self,
translatefpk: FPk,
translatefpkh: FPkh
) -> Result<<Miniscript<Pk, Ctx> as TranslatePk<Pk, Q>>::Output, FuncError> where
FPk: FnMut(&Pk) -> Result<Q, FuncError>,
FPkh: FnMut(&<Pk as MiniscriptKey>::Hash) -> Result<<Q as MiniscriptKey>::Hash, FuncError>,
[src]
pub fn translate_pk<FPk, FPkh, FuncError>(
&self,
translatefpk: FPk,
translatefpkh: FPkh
) -> Result<<Miniscript<Pk, Ctx> as TranslatePk<Pk, Q>>::Output, FuncError> where
FPk: FnMut(&Pk) -> Result<Q, FuncError>,
FPkh: FnMut(&<Pk as MiniscriptKey>::Hash) -> Result<<Q as MiniscriptKey>::Hash, FuncError>,
[src]This will panic if translatefpk returns an uncompressed key when converting to a Segwit descriptor. To prevent this panic, ensure translatefpk returns an error in this case instead.
type Output = Miniscript<Q, Ctx>
type Output = Miniscript<Q, Ctx>
The associated output type. This must be Self
fn translate_pk_infallible<Fpk, Fpkh>(
&self,
translatefpk: Fpk,
translatefpkh: Fpkh
) -> Self::Output where
Fpk: FnMut(&P) -> Q,
Fpkh: FnMut(&<P as MiniscriptKey>::Hash) -> <Q as MiniscriptKey>::Hash,
[src]
fn translate_pk_infallible<Fpk, Fpkh>(
&self,
translatefpk: Fpk,
translatefpkh: Fpkh
) -> Self::Output where
Fpk: FnMut(&P) -> Q,
Fpkh: FnMut(&<P as MiniscriptKey>::Hash) -> <Q as MiniscriptKey>::Hash,
[src]Calls translate_pk
with conversion functions that cannot fail
impl<Pk, Ctx> Eq for Miniscript<Pk, Ctx> where
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
Ctx: ScriptContext,
Pk: MiniscriptKey,
Eq
of Miniscript
must depend only on node and not the type information.
The type information and extra_properties can be deterministically determined
by the ast.
Auto Trait Implementations
impl<Pk, Ctx> RefUnwindSafe for Miniscript<Pk, Ctx> where
Ctx: RefUnwindSafe,
Pk: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash: RefUnwindSafe,
Ctx: RefUnwindSafe,
Pk: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash: RefUnwindSafe,
impl<Pk, Ctx> Send for Miniscript<Pk, Ctx> where
Ctx: Send + Sync,
Pk: Send + Sync,
<Pk as MiniscriptKey>::Hash: Send + Sync,
Ctx: Send + Sync,
Pk: Send + Sync,
<Pk as MiniscriptKey>::Hash: Send + Sync,
impl<Pk, Ctx> Sync for Miniscript<Pk, Ctx> where
Ctx: Send + Sync,
Pk: Send + Sync,
<Pk as MiniscriptKey>::Hash: Send + Sync,
Ctx: Send + Sync,
Pk: Send + Sync,
<Pk as MiniscriptKey>::Hash: Send + Sync,
impl<Pk, Ctx> Unpin for Miniscript<Pk, Ctx> where
Ctx: Unpin,
Pk: Unpin,
<Pk as MiniscriptKey>::Hash: Unpin,
Ctx: Unpin,
Pk: Unpin,
<Pk as MiniscriptKey>::Hash: Unpin,
impl<Pk, Ctx> UnwindSafe for Miniscript<Pk, Ctx> where
Ctx: RefUnwindSafe + UnwindSafe,
Pk: RefUnwindSafe + UnwindSafe,
<Pk as MiniscriptKey>::Hash: RefUnwindSafe + UnwindSafe,
Ctx: RefUnwindSafe + UnwindSafe,
Pk: RefUnwindSafe + UnwindSafe,
<Pk as MiniscriptKey>::Hash: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<P, Q, T> TranslatePk1<P, Q> for T where
P: MiniscriptKey,
T: TranslatePk<P, Q>,
Q: MiniscriptKey<Hash = <P as MiniscriptKey>::Hash>,
[src]
impl<P, Q, T> TranslatePk1<P, Q> for T where
P: MiniscriptKey,
T: TranslatePk<P, Q>,
Q: MiniscriptKey<Hash = <P as MiniscriptKey>::Hash>,
[src]impl<P, Q, T> TranslatePk2<P, Q> for T where
P: MiniscriptKey<Hash = P>,
T: TranslatePk<P, Q>,
Q: MiniscriptKey,
[src]
impl<P, Q, T> TranslatePk2<P, Q> for T where
P: MiniscriptKey<Hash = P>,
T: TranslatePk<P, Q>,
Q: MiniscriptKey,
[src]impl<P, Q, T> TranslatePk3<P, Q> for T where
P: MiniscriptKey + ToPublicKey,
T: TranslatePk<P, Q>,
Q: MiniscriptKey<Hash = Hash>,
[src]
impl<P, Q, T> TranslatePk3<P, Q> for T where
P: MiniscriptKey + ToPublicKey,
T: TranslatePk<P, Q>,
Q: MiniscriptKey<Hash = Hash>,
[src]impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,