[−][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
Proprties 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.
Methods
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]
fn clone(&self) -> Correctness
[src]
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Correctness
[src]
fn cmp(&self, other: &Correctness) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Correctness> for Correctness
[src]
fn eq(&self, other: &Correctness) -> bool
[src]
fn ne(&self, other: &Correctness) -> bool
[src]
impl PartialOrd<Correctness> for Correctness
[src]
fn partial_cmp(&self, other: &Correctness) -> Option<Ordering>
[src]
fn lt(&self, other: &Correctness) -> bool
[src]
fn le(&self, other: &Correctness) -> bool
[src]
fn gt(&self, other: &Correctness) -> bool
[src]
fn ge(&self, other: &Correctness) -> bool
[src]
impl Property for Correctness
[src]
fn sanity_checks(&self)
[src]
fn from_true() -> Self
[src]
fn from_false() -> Self
[src]
fn from_pk() -> 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 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>,
fn from_sha256() -> Self
[src]
fn from_hash256() -> Self
[src]
fn from_ripemd160() -> Self
[src]
fn from_hash160() -> Self
[src]
fn from_after(t: u32) -> Self
[src]
fn from_older(t: u32) -> Self
[src]
fn cast_unlikely(self) -> Result<Self, ErrorKind>
[src]
fn cast_likely(self) -> Result<Self, ErrorKind>
[src]
fn and_n(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn type_check<Pk, C>(
fragment: &Terminal<Pk>,
child: C
) -> Result<Self, Error<Pk>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
[src]
fragment: &Terminal<Pk>,
child: C
) -> Result<Self, Error<Pk>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
impl StructuralEq for Correctness
[src]
impl StructuralPartialEq for Correctness
[src]
Auto Trait Implementations
impl RefUnwindSafe for Correctness
impl Send for Correctness
impl Sync for Correctness
impl Unpin for Correctness
impl UnwindSafe for Correctness
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,