pub trait ExtScriptContext: ScriptContext {
// Required method
fn as_enum() -> ScriptContextEnum;
// Provided methods
fn is_legacy() -> bool { ... }
fn is_segwit_v0() -> bool { ... }
fn is_taproot() -> bool { ... }
}
Expand description
Trait that adds extra useful methods to ScriptContext
s
Required Methods§
Sourcefn as_enum() -> ScriptContextEnum
fn as_enum() -> ScriptContextEnum
Returns the ScriptContext
as a ScriptContextEnum
Provided Methods§
Sourcefn is_segwit_v0() -> bool
fn is_segwit_v0() -> bool
Returns whether the script context is Segwitv0
Sourcefn is_taproot() -> bool
fn is_taproot() -> bool
Returns whether the script context is Tap
, aka Taproot or Segwit V1
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.