pub trait Extension:
Clone
+ Eq
+ Ord
+ Debug
+ Display
+ Hash {
// Required methods
fn corr_prop(&self) -> Correctness;
fn mall_prop(&self) -> Malleability;
fn extra_prop(&self) -> ExtData;
fn script_size(&self) -> usize;
fn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>;
fn from_name_tree(
_name: &str,
children: &[Tree<'_>],
) -> Result<Self, FromTokenIterError>;
// Provided method
fn tap_ctx_checks(&self) -> Result<(), ScriptContextError> { ... }
}
Expand description
Extensions to elements-miniscript. Refer to implementations(unimplemented!) for example and tutorials
Required Methods§
Sourcefn corr_prop(&self) -> Correctness
fn corr_prop(&self) -> Correctness
Calculate the correctness property for the leaf fragment. See miniscript reference for more info on different types
Sourcefn mall_prop(&self) -> Malleability
fn mall_prop(&self) -> Malleability
Calculate the malleability property for the leaf fragment. See miniscript reference for more info on different types
Sourcefn extra_prop(&self) -> ExtData
fn extra_prop(&self) -> ExtData
Calculate the Extra properties property for the leaf fragment. See current implementation for different fragments in extra_props.rs
Sourcefn script_size(&self) -> usize
fn script_size(&self) -> usize
Get the script size of the current fragment
Sourcefn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>
fn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>
Validity rules for fragment in segwit context
Sourcefn from_name_tree(
_name: &str,
children: &[Tree<'_>],
) -> Result<Self, FromTokenIterError>
fn from_name_tree( _name: &str, children: &[Tree<'_>], ) -> Result<Self, FromTokenIterError>
Create an instance of this object from a Tree with root name and children as
Vec<Tree>
.
Provided Methods§
Sourcefn tap_ctx_checks(&self) -> Result<(), ScriptContextError>
fn tap_ctx_checks(&self) -> Result<(), ScriptContextError>
Validity rules for fragment in tap context
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.