Trait sapio_miniscript::miniscript::types::Property [−][src]
Trait representing a type property, which defines how the property propagates from terminals to the root of a Miniscript
Required methods
fn from_true() -> Self
[src]
Type property of the True
fragment
fn from_false() -> Self
[src]
Type property of the False
fragment
fn from_pk_k() -> Self
[src]
Type property of the PkK
fragment
fn from_pk_h() -> Self
[src]
Type property of the PkH
fragment
fn from_multi(k: usize, n: usize) -> Self
[src]
Type property of a Multi
fragment
fn from_hash() -> Self
[src]
Type property of a hash fragment
fn from_txtemplate() -> Self
[src]
Type property of a TxTemplate
hash. Default implementation simply
passes through to from_txtemplate
fn from_time(t: u32) -> Self
[src]
Type property of a timelock
fn cast_alt(self) -> Result<Self, ErrorKind>
[src]
Cast using the Alt
wrapper
fn cast_swap(self) -> Result<Self, ErrorKind>
[src]
Cast using the Swap
wrapper
fn cast_check(self) -> Result<Self, ErrorKind>
[src]
Cast using the Check
wrapper
fn cast_dupif(self) -> Result<Self, ErrorKind>
[src]
Cast using the DupIf
wrapper
fn cast_verify(self) -> Result<Self, ErrorKind>
[src]
Cast using the Verify
wrapper
fn cast_nonzero(self) -> Result<Self, ErrorKind>
[src]
Cast using the NonZero
wrapper
fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
[src]
Cast using the ZeroNotEqual
wrapper
fn cast_true(self) -> Result<Self, ErrorKind>
[src]
Cast by changing [X]
to AndV([X], True)
fn cast_or_i_false(self) -> Result<Self, ErrorKind>
[src]
Cast by changing [X]
to or_i([X], 0)
or or_i(0, [X])
fn and_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
Computes the type of an AndB
fragment
fn and_v(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
Computes the type of an AndV
fragment
fn or_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
Computes the type of an OrB
fragment
fn or_d(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
Computes the type of an OrD
fragment
fn or_c(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
Computes the type of an OrC
fragment
fn or_i(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
Computes the type of an OrI
fragment
fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
[src]
Computes the type of an AndOr
fragment
fn threshold<S>(k: usize, n: usize, sub_ck: S) -> Result<Self, ErrorKind> where
S: FnMut(usize) -> Result<Self, ErrorKind>,
[src]
S: FnMut(usize) -> Result<Self, ErrorKind>,
Computes the type of an Thresh
fragment
Provided methods
fn sanity_checks(&self)
[src]
Any extra sanity checks/assertions that should be applied after typechecking
fn from_sha256() -> Self
[src]
Type property of a Sha256
hash. Default implementation simply
passes through to from_hash
fn from_hash256() -> Self
[src]
Type property of a Hash256
hash. Default implementation simply
passes through to from_hash
fn from_ripemd160() -> Self
[src]
Type property of a Ripemd160
hash. Default implementation simply
passes through to from_hash
fn from_hash160() -> Self
[src]
Type property of a Hash160
hash. Default implementation simply
passes through to from_hash
fn from_after(t: u32) -> Self
[src]
Type property of a relative timelock. Default implementation simply
passes through to from_time
fn from_older(t: u32) -> Self
[src]
Type property of an absolute timelock. Default implementation simply
passes through to from_time
fn cast_unlikely(self) -> Result<Self, ErrorKind>
[src]
Cast by changing [X]
to or_i([X], 0)
. Default implementation
simply passes through to cast_or_i_false
fn cast_likely(self) -> Result<Self, ErrorKind>
[src]
Cast by changing [X]
to or_i(0, [X])
. Default implementation
simply passes through to cast_or_i_false
fn and_n(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
Computes the type of an AndN
fragment
fn type_check<Pk, Ctx, C>(
fragment: &Terminal<Pk, Ctx>,
child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
Ctx: ScriptContext,
[src]
fragment: &Terminal<Pk, Ctx>,
child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
Ctx: ScriptContext,
Compute the type of a fragment, given a function to look up the types of its children, if available and relevant for the given fragment
Implementors
impl Property for Correctness
[src]
fn sanity_checks(&self)
[src]
fn from_true() -> Self
[src]
fn from_false() -> Self
[src]
fn from_pk_k() -> Self
[src]
fn from_pk_h() -> Self
[src]
fn from_multi(_: usize, _: usize) -> Self
[src]
fn from_hash() -> Self
[src]
fn from_time(_: u32) -> Self
[src]
fn from_txtemplate() -> Self
[src]
fn cast_alt(self) -> Result<Self, ErrorKind>
[src]
fn cast_swap(self) -> Result<Self, ErrorKind>
[src]
fn cast_check(self) -> Result<Self, ErrorKind>
[src]
fn cast_dupif(self) -> Result<Self, ErrorKind>
[src]
fn cast_verify(self) -> Result<Self, ErrorKind>
[src]
fn cast_nonzero(self) -> Result<Self, ErrorKind>
[src]
fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
[src]
fn cast_true(self) -> Result<Self, ErrorKind>
[src]
fn cast_or_i_false(self) -> Result<Self, ErrorKind>
[src]
fn and_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn and_v(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_d(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_c(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_i(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
[src]
fn threshold<S>(k: usize, n: usize, sub_ck: S) -> Result<Self, ErrorKind> where
S: FnMut(usize) -> Result<Self, ErrorKind>,
[src]
S: FnMut(usize) -> Result<Self, ErrorKind>,
impl Property for ExtData
[src]
fn sanity_checks(&self)
[src]
fn from_true() -> Self
[src]
fn from_false() -> Self
[src]
fn from_pk_k() -> Self
[src]
fn from_pk_h() -> Self
[src]
fn from_multi(k: usize, n: usize) -> Self
[src]
fn from_hash() -> Self
[src]
fn from_sha256() -> Self
[src]
fn from_txtemplate() -> Self
[src]
fn from_hash256() -> Self
[src]
fn from_ripemd160() -> Self
[src]
fn from_hash160() -> Self
[src]
fn from_time(_t: u32) -> Self
[src]
fn from_after(t: u32) -> Self
[src]
fn from_older(t: u32) -> Self
[src]
fn cast_alt(self) -> Result<Self, ErrorKind>
[src]
fn cast_swap(self) -> Result<Self, ErrorKind>
[src]
fn cast_check(self) -> Result<Self, ErrorKind>
[src]
fn cast_dupif(self) -> Result<Self, ErrorKind>
[src]
fn cast_verify(self) -> Result<Self, ErrorKind>
[src]
fn cast_nonzero(self) -> Result<Self, ErrorKind>
[src]
fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
[src]
fn cast_true(self) -> Result<Self, ErrorKind>
[src]
fn cast_or_i_false(self) -> Result<Self, ErrorKind>
[src]
fn cast_unlikely(self) -> Result<Self, ErrorKind>
[src]
fn cast_likely(self) -> Result<Self, ErrorKind>
[src]
fn and_b(l: Self, r: Self) -> Result<Self, ErrorKind>
[src]
fn and_v(l: Self, r: Self) -> Result<Self, ErrorKind>
[src]
fn or_b(l: Self, r: Self) -> Result<Self, ErrorKind>
[src]
fn or_d(l: Self, r: Self) -> Result<Self, ErrorKind>
[src]
fn or_c(l: Self, r: Self) -> Result<Self, ErrorKind>
[src]
fn or_i(l: Self, r: Self) -> Result<Self, ErrorKind>
[src]
fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
[src]
fn threshold<S>(k: usize, n: usize, sub_ck: S) -> Result<Self, ErrorKind> where
S: FnMut(usize) -> Result<Self, ErrorKind>,
[src]
S: FnMut(usize) -> Result<Self, ErrorKind>,
fn type_check<Pk, Ctx, C>(
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Ctx: ScriptContext,
Pk: MiniscriptKey,
[src]
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Ctx: ScriptContext,
Pk: MiniscriptKey,
Compute the type of a fragment assuming all the children of Miniscript have been computed already.
impl Property for Malleability
[src]
fn from_true() -> Self
[src]
fn from_false() -> Self
[src]
fn from_pk_k() -> Self
[src]
fn from_pk_h() -> Self
[src]
fn from_multi(_: usize, _: usize) -> Self
[src]
fn from_hash() -> Self
[src]
fn from_time(_: u32) -> Self
[src]
fn from_txtemplate() -> Self
[src]
fn cast_alt(self) -> Result<Self, ErrorKind>
[src]
fn cast_swap(self) -> Result<Self, ErrorKind>
[src]
fn cast_check(self) -> Result<Self, ErrorKind>
[src]
fn cast_dupif(self) -> Result<Self, ErrorKind>
[src]
fn cast_verify(self) -> Result<Self, ErrorKind>
[src]
fn cast_nonzero(self) -> Result<Self, ErrorKind>
[src]
fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
[src]
fn cast_true(self) -> Result<Self, ErrorKind>
[src]
fn cast_or_i_false(self) -> Result<Self, ErrorKind>
[src]
fn and_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn and_v(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_d(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_c(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_i(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
[src]
fn threshold<S>(k: usize, n: usize, sub_ck: S) -> Result<Self, ErrorKind> where
S: FnMut(usize) -> Result<Self, ErrorKind>,
[src]
S: FnMut(usize) -> Result<Self, ErrorKind>,
impl Property for Type
[src]
fn sanity_checks(&self)
[src]
fn from_true() -> Self
[src]
fn from_false() -> Self
[src]
fn from_pk_k() -> Self
[src]
fn from_pk_h() -> Self
[src]
fn from_multi(k: usize, n: usize) -> Self
[src]
fn from_hash() -> Self
[src]
fn from_sha256() -> Self
[src]
fn from_txtemplate() -> Self
[src]
fn from_hash256() -> Self
[src]
fn from_ripemd160() -> Self
[src]
fn from_hash160() -> Self
[src]
fn from_time(t: u32) -> Self
[src]
fn from_after(t: u32) -> Self
[src]
fn from_older(t: u32) -> Self
[src]
fn cast_alt(self) -> Result<Self, ErrorKind>
[src]
fn cast_swap(self) -> Result<Self, ErrorKind>
[src]
fn cast_check(self) -> Result<Self, ErrorKind>
[src]
fn cast_dupif(self) -> Result<Self, ErrorKind>
[src]
fn cast_verify(self) -> Result<Self, ErrorKind>
[src]
fn cast_nonzero(self) -> Result<Self, ErrorKind>
[src]
fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
[src]
fn cast_true(self) -> Result<Self, ErrorKind>
[src]
fn cast_or_i_false(self) -> Result<Self, ErrorKind>
[src]
fn cast_unlikely(self) -> Result<Self, ErrorKind>
[src]
fn cast_likely(self) -> Result<Self, ErrorKind>
[src]
fn and_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn and_v(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_d(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_c(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_i(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
[src]
fn threshold<S>(k: usize, n: usize, sub_ck: S) -> Result<Self, ErrorKind> where
S: FnMut(usize) -> Result<Self, ErrorKind>,
[src]
S: FnMut(usize) -> Result<Self, ErrorKind>,
fn type_check<Pk, Ctx, C>(
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
Ctx: ScriptContext,
[src]
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
Ctx: ScriptContext,
Compute the type of a fragment assuming all the children of Miniscript have been computed already.