[−][src]Enum miniscript::miniscript::astelem::AstElem
All AST elements
Variants
Pk(P)
<key> CHECKSIG
PkV(P)
<key> CHECKSIGVERIFY
PkQ(P)
<key>
PkW(P)
SWAP <key> CHECKSIG
Multi(usize, Vec<P>)
<k> <keys...> <n> CHECKMULTISIG
MultiV(usize, Vec<P>)
<k> <keys...> <n> CHECKMULTISIGVERIFY
TimeT(u32)
<n> CHECKSEQUENCEVERIFY
TimeV(u32)
<n> CHECKSEQUENCEVERIFY DROP
TimeF(u32)
<n> CHECKSEQUENCEVERIFY 0NOTEQUAL
Time(u32)
DUP IF <n> CHECKSEQUENCEVERIFY DROP ENDIF
TimeW(u32)
SWAP DUP IF <n> CHECKSEQUENCEVERIFY DROP ENDIF
HashT(Hash)
SIZE 32 EQUALVERIFY SHA256 <hash> EQUAL
HashV(Hash)
SIZE 32 EQUALVERIFY SHA256 <hash> EQUALVERIFY
HashW(Hash)
SWAP SIZE 0NOTEQUAL IF SIZE 32 EQUALVERIFY SHA256 <hash> EQUALVERIFY 1 ENDIF
True(Box<AstElem<P>>)
<V> 1
Wrap(Box<AstElem<P>>)
TAS <E> FAS
Likely(Box<AstElem<P>>)
NOTIF <F> ELSE 0 ENDIF
Unlikely(Box<AstElem<P>>)
IF <F> ELSE 0 ENDIF
AndCat(Box<AstElem<P>>, Box<AstElem<P>>)
<V> <T/V/F/Q>
AndBool(Box<AstElem<P>>, Box<AstElem<P>>)
<E> <W> BOOLAND
AndCasc(Box<AstElem<P>>, Box<AstElem<P>>)
<E> NOTIF 0 ELSE <F> ENDIF
OrBool(Box<AstElem<P>>, Box<AstElem<P>>)
<E> <W> BoolOr
OrCasc(Box<AstElem<P>>, Box<AstElem<P>>)
<E> IFDUP NOTIF <T/E> ENDIF
OrCont(Box<AstElem<P>>, Box<AstElem<P>>)
<E> NOTIF <V> ENDIF
OrKey(Box<AstElem<P>>, Box<AstElem<P>>)
IF <Q> ELSE <Q> ENDIF CHECKSIG
OrKeyV(Box<AstElem<P>>, Box<AstElem<P>>)
IF <Q> ELSE <Q> ENDIF CHECKSIGVERIFY
OrIf(Box<AstElem<P>>, Box<AstElem<P>>)
IF <sub1> ELSE <sub2> ENDIF
for many choices of sub1
and sub2
OrIfV(Box<AstElem<P>>, Box<AstElem<P>>)
IF <T> ELSE <T> ENDIF VERIFY
OrNotif(Box<AstElem<P>>, Box<AstElem<P>>)
NOTIF <F> ELSE <E> ENDIF
Thresh(usize, Vec<AstElem<P>>)
<E> (<W> ADD)* <n> EQUAL
ThreshV(usize, Vec<AstElem<P>>)
<E> (<W> ADD)* <n> EQUALVERIFY
Methods
impl<P> AstElem<P>
[src]
pub fn is_e(&self) -> bool
[src]
Does the element satisfy the "expression" calling convention?
pub fn is_q(&self) -> bool
[src]
Does the element satisfy the "queue" calling convention?
pub fn is_w(&self) -> bool
[src]
Does the element satisfy the "wrapped" calling convention?
pub fn is_f(&self) -> bool
[src]
Does the element satisfy the "forced" calling convention?
pub fn is_v(&self) -> bool
[src]
Does the element satisfy the "verify" calling convention?
pub fn is_t(&self) -> bool
[src]
Does the element satisfy the "toplevel" calling convention?
pub fn translate<Func, Q, Error>(
&self,
translatefn: &mut Func
) -> Result<AstElem<Q>, Error> where
Func: FnMut(&P) -> Result<Q, Error>,
[src]
&self,
translatefn: &mut Func
) -> Result<AstElem<Q>, Error> where
Func: FnMut(&P) -> Result<Q, Error>,
Convert an AST element with one public key type to one of another public key type
impl<P: Clone> AstElem<P>
[src]
pub fn abstract_policy(&self) -> AbstractPolicy<P>
[src]
Abstract the script into an "abstract policy" which can be filtered and analyzed
pub fn public_keys(&self) -> Vec<P>
[src]
Return a list of all public keys which might contribute to satisfaction of the scriptpubkey
impl<P: ToPublicKey> AstElem<P>
[src]
pub fn encode(&self, builder: Builder) -> Builder
[src]
Encode the element as a fragment of Bitcoin Script. The inverse
function, from Script to an AST element, is implemented in the
parse
module.
Trait Implementations
impl<P: ToPublicKey> Satisfiable<P> for AstElem<P>
[src]
fn satisfy<F, H>(
&self,
keyfn: Option<&mut F>,
hashfn: Option<&mut H>,
age: u32
) -> Result<Vec<Vec<u8>>, Error> where
F: FnMut(&P) -> Option<(Signature, Option<SigHashType>)>,
H: FnMut(Hash) -> Option<[u8; 32]>,
[src]
&self,
keyfn: Option<&mut F>,
hashfn: Option<&mut H>,
age: u32
) -> Result<Vec<Vec<u8>>, Error> where
F: FnMut(&P) -> Option<(Signature, Option<SigHashType>)>,
H: FnMut(Hash) -> Option<[u8; 32]>,
impl<P: ToPublicKey> Dissatisfiable<P> for AstElem<P>
[src]
fn dissatisfy(&self) -> Vec<Vec<u8>>
[src]
impl<P: FromStr> FromTree for AstElem<P> where
<P as FromStr>::Err: ToString,
[src]
<P as FromStr>::Err: ToString,
impl<P: PartialOrd> PartialOrd<AstElem<P>> for AstElem<P>
[src]
fn partial_cmp(&self, other: &AstElem<P>) -> Option<Ordering>
[src]
fn lt(&self, other: &AstElem<P>) -> bool
[src]
fn le(&self, other: &AstElem<P>) -> bool
[src]
fn gt(&self, other: &AstElem<P>) -> bool
[src]
fn ge(&self, other: &AstElem<P>) -> bool
[src]
impl<P: PartialEq> PartialEq<AstElem<P>> for AstElem<P>
[src]
impl<P> From<AstElem<P>> for Miniscript<P>
[src]
fn from(t: AstElem<P>) -> Miniscript<P>
[src]
impl<P: Clone> Clone for AstElem<P>
[src]
fn clone(&self) -> AstElem<P>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<P: Ord> Ord for AstElem<P>
[src]
fn cmp(&self, other: &AstElem<P>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more
impl<P: Eq> Eq for AstElem<P>
[src]
impl<P: Display> Display for AstElem<P>
[src]
impl<P: Debug> Debug for AstElem<P>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,