pub struct ScriptPathOptimizer { /* private fields */ }Expand description
Analyzer for script path optimization
Implementations§
Source§impl ScriptPathOptimizer
impl ScriptPathOptimizer
Sourcepub fn record_usage(&mut self, script: Vec<u8>)
pub fn record_usage(&mut self, script: Vec<u8>)
Record script usage
Sourcepub fn build_optimized_tree(&self) -> Result<TapscriptNode, BitcoinError>
pub fn build_optimized_tree(&self) -> Result<TapscriptNode, BitcoinError>
Build optimized tree based on usage patterns
Sourcepub fn calculate_expected_witness_size(&self, tree: &TapscriptNode) -> f64
pub fn calculate_expected_witness_size(&self, tree: &TapscriptNode) -> f64
Calculate expected witness size for a tree
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScriptPathOptimizer
impl RefUnwindSafe for ScriptPathOptimizer
impl Send for ScriptPathOptimizer
impl Sync for ScriptPathOptimizer
impl Unpin for ScriptPathOptimizer
impl UnwindSafe for ScriptPathOptimizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more