[−][src]Struct miniscript::miniscript::types::correctness::Correctness
Structure representing the type properties of a fragment which are relevant to completeness (are all expected branches actually accessible, given some valid witness) and soundness (is it possible to satisfy the Script without satisfying one of the Miniscript branches).
Fields
base: Base
The base type
input: Input
Properties of the inputs
dissatisfiable: bool
Whether it is definitely possible to dissatisfy the expression.
If this is false, it does not necessarily mean that dissatisfaction
is impossible (see Dissat::None
for this property); it only means
that we cannot depend on having a dissatisfaction when reasoning
about completeness.
unit: bool
Whether the fragment's "nonzero" output on satisfaction is always the constant 1.
Implementations
impl Correctness
[src]
pub fn is_subtype(&self, other: Self) -> bool
[src]
Check whether the self
is a subtype of other
argument .
This checks whether the argument other
has attributes which are present
in the given Type
. This returns true
on same arguments
a.is_subtype(a)
is true
.
Trait Implementations
impl Clone for Correctness
[src]
pub fn clone(&self) -> Correctness
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Correctness
[src]
impl Debug for Correctness
[src]
impl Eq for Correctness
[src]
impl Hash for Correctness
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Correctness
[src]
pub fn cmp(&self, other: &Correctness) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Correctness> for Correctness
[src]
pub fn eq(&self, other: &Correctness) -> bool
[src]
pub fn ne(&self, other: &Correctness) -> bool
[src]
impl PartialOrd<Correctness> for Correctness
[src]
pub fn partial_cmp(&self, other: &Correctness) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Correctness) -> bool
[src]
pub fn le(&self, other: &Correctness) -> bool
[src]
pub fn gt(&self, other: &Correctness) -> bool
[src]
pub fn ge(&self, other: &Correctness) -> bool
[src]
impl Property for Correctness
[src]
pub fn sanity_checks(&self)
[src]
pub fn from_true() -> Self
[src]
pub fn from_false() -> Self
[src]
pub fn from_pk_k() -> Self
[src]
pub fn from_pk_h() -> Self
[src]
pub fn from_multi(_: usize, _: usize) -> Self
[src]
pub fn from_hash() -> Self
[src]
pub fn from_time(_: u32) -> Self
[src]
pub fn cast_alt(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_swap(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_check(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_dupif(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_verify(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_nonzero(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_true(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_or_i_false(self) -> Result<Self, ErrorKind>
[src]
pub fn and_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
pub fn and_v(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
pub fn or_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
pub fn or_d(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
pub fn or_c(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
pub fn or_i(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
pub fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
[src]
pub fn threshold<S>(
k: usize,
n: usize,
mut sub_ck: S
) -> Result<Self, ErrorKind> where
S: FnMut(usize) -> Result<Self, ErrorKind>,
[src]
k: usize,
n: usize,
mut sub_ck: S
) -> Result<Self, ErrorKind> where
S: FnMut(usize) -> Result<Self, ErrorKind>,
pub fn from_sha256() -> Self
[src]
pub fn from_hash256() -> Self
[src]
pub fn from_ripemd160() -> Self
[src]
pub fn from_hash160() -> Self
[src]
pub fn from_after(t: u32) -> Self
[src]
pub fn from_older(t: u32) -> Self
[src]
pub fn cast_unlikely(self) -> Result<Self, ErrorKind>
[src]
pub fn cast_likely(self) -> Result<Self, ErrorKind>
[src]
pub fn and_n(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
pub fn type_check<Pk, Ctx, C>(
fragment: &Terminal<Pk, Ctx>,
mut child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
Ctx: ScriptContext,
[src]
fragment: &Terminal<Pk, Ctx>,
mut child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
Ctx: ScriptContext,
impl StructuralEq for Correctness
[src]
impl StructuralPartialEq for Correctness
[src]
Auto Trait Implementations
impl RefUnwindSafe for Correctness
[src]
impl Send for Correctness
[src]
impl Sync for Correctness
[src]
impl Unpin for Correctness
[src]
impl UnwindSafe for Correctness
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,