1 <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Segwitv0` enum in crate `bdk`."><meta name="keywords" content="rust, rustlang, rust-lang, Segwitv0"><title>bdk::descriptor::Segwitv0 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
2 <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
3 <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../bdk/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Enum Segwitv0</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq%3CSegwitv0%3E">PartialEq<Segwitv0></a><a href="#impl-PartialOrd%3CSegwitv0%3E">PartialOrd<Segwitv0></a><a href="#impl-ScriptContext">ScriptContext</a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Equivalent%3CK%3E">Equivalent<K></a><a href="#impl-ExtScriptContext">ExtScriptContext</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Pointable">Pointable</a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">bdk</a>::<wbr><a href="index.html">descriptor</a></p><script>window.sidebarCurrent = {name: "Segwitv0", ty: "enum", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
4 <a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></span><span class="in-band">Enum <a href="../index.html">bdk</a>::<wbr><a href="index.html">descriptor</a>::<wbr><a class="enum" href="">Segwitv0</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum Segwitv0 {}</pre></div><div class="docblock"><p>Segwitv0 ScriptContext</p>
5 </div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-Clone" class="anchor"></a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
6 </div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
7 </div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-Debug" class="anchor"></a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></code></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
8 </div></div><h3 id="impl-Eq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-Eq" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Ord" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-Ord" class="anchor"></a></h3><div class="impl-items"><h4 id="method.cmp" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fnname">cmp</a>(&self, other: &<a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code></h4><div class='docblock hidden'><p>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
9 </div><h4 id="method.max" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fnname">max</a>(self, other: Self) -> Self</code><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#719-724" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
10 </div><h4 id="method.min" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fnname">min</a>(self, other: Self) -> Self</code><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#739-744" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
11 </div><h4 id="method.clamp" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fnname">clamp</a>(self, min: Self, max: Self) -> Self</code><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#764-776" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
12 </div></div><h3 id="impl-PartialEq%3CSegwitv0%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a>> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-PartialEq%3CSegwitv0%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
13 by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
14 </div><h4 id="method.ne" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#209-211" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
15 </div></div><h3 id="impl-PartialOrd%3CSegwitv0%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a>> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-PartialOrd%3CSegwitv0%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.partial_cmp" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&self, other: &<a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></code></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
16 </div><h4 id="method.lt" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#959-961" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
17 </div><h4 id="method.le" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#978-980" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
18 operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
19 </div><h4 id="method.gt" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#996-998" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
20 </div><h4 id="method.ge" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1015-1017" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
21 operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
22 </div></div><h3 id="impl-ScriptContext" class="impl"><code class="in-band">impl <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-ScriptContext" class="anchor"></a></h3><div class="impl-items"><h4 id="method.check_terminal_non_malleable" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#tymethod.check_terminal_non_malleable" class="fnname">check_terminal_non_malleable</a><Pk, Ctx>(<br> _frag: &<a class="enum" href="../../bdk/descriptor/enum.Terminal.html" title="enum bdk::descriptor::Terminal">Terminal</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, ScriptContextError> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Depending on ScriptContext, fragments can be malleable. For Example,
23 under Legacy context, PkH is malleable because it is possible to
24 estimate the cost of satisfaction because of compressed keys
25 This is currently only used in compiler code for removing malleable
27 This does NOT recursively check if the children of the fragment are
28 valid or not. Since the compilation proceeds in a leaf to root fashion,
29 a recursive check is unnecessary. <a href="../../bdk/keys/trait.ScriptContext.html#tymethod.check_terminal_non_malleable">Read more</a></p>
30 </div><h4 id="method.check_witness" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.check_witness" class="fnname">check_witness</a><Pk, Ctx>(<br> witness: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, ScriptContextError> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Check whether the given satisfaction is valid under the ScriptContext
31 For example, segwit satisfactions may fail if the witness len is more
32 3600 or number of stack elements are more than 100. <a href="../../bdk/keys/trait.ScriptContext.html#method.check_witness">Read more</a></p>
33 </div><h4 id="method.check_global_consensus_validity" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.check_global_consensus_validity" class="fnname">check_global_consensus_validity</a><Pk, Ctx>(<br> ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, ScriptContextError> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Depending on script Context, some of the Terminals might not
34 be valid under the current consensus rules.
35 Or some of the script resource limits may have been exceeded.
36 These miniscripts would never be accepted by the Bitcoin network and hence
37 it is safe to discard them
38 For example, in Segwit Context with MiniscriptKey as bitcoin::PublicKey
39 uncompressed public keys are non-standard and thus invalid.
40 In LegacyP2SH context, scripts above 520 bytes are invalid.
41 Post Tapscript upgrade, this would have to consider other nodes.
42 This does <em>NOT</em> recursively check the miniscript fragments. <a href="../../bdk/keys/trait.ScriptContext.html#method.check_global_consensus_validity">Read more</a></p>
43 </div><h4 id="method.check_local_consensus_validity" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.check_local_consensus_validity" class="fnname">check_local_consensus_validity</a><Pk, Ctx>(<br> ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, ScriptContextError> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Consensus rules at the Miniscript satisfaction time.
44 It is possible that some paths of miniscript may exceed resource limits
45 and our current satisfier and lifting analysis would not work correctly.
46 For example, satisfaction path(Legacy/Segwitv0) may require more than 201 opcodes. <a href="../../bdk/keys/trait.ScriptContext.html#method.check_local_consensus_validity">Read more</a></p>
47 </div><h4 id="method.check_global_policy_validity" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.check_global_policy_validity" class="fnname">check_global_policy_validity</a><Pk, Ctx>(<br> ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, ScriptContextError> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Depending on script Context, some of the script resource limits
48 may have been exceeded under the current bitcoin core policy rules
49 These miniscripts would never be accepted by the Bitcoin network and hence
50 it is safe to discard them. (unless explicitly disabled by non-standard flag)
51 For example, in Segwit Context with MiniscriptKey as bitcoin::PublicKey
52 scripts over 3600 bytes are invalid.
53 Post Tapscript upgrade, this would have to consider other nodes.
54 This does <em>NOT</em> recursively check the miniscript fragments. <a href="../../bdk/keys/trait.ScriptContext.html#method.check_global_policy_validity">Read more</a></p>
55 </div><h4 id="method.check_local_policy_validity" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.check_local_policy_validity" class="fnname">check_local_policy_validity</a><Pk, Ctx>(<br> ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, ScriptContextError> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Policy rules at the Miniscript satisfaction time.
56 It is possible that some paths of miniscript may exceed resource limits
57 and our current satisfier and lifting analysis would not work correctly.
58 For example, satisfaction path in Legacy context scriptSig more
59 than 1650 bytes <a href="../../bdk/keys/trait.ScriptContext.html#method.check_local_policy_validity">Read more</a></p>
60 </div><h4 id="method.max_satisfaction_size" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#tymethod.max_satisfaction_size" class="fnname">max_satisfaction_size</a><Pk, Ctx>(ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Depending on script context, the size of a satifaction witness may slightly differ.</p>
61 </div><h4 id="method.check_global_validity" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.check_global_validity" class="fnname">check_global_validity</a><Pk, Ctx>(<br> ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, ScriptContextError> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Check the consensus + policy(if not disabled) rules that are not based
62 satisfaction <a href="../../bdk/keys/trait.ScriptContext.html#method.check_global_validity">Read more</a></p>
63 </div><h4 id="method.check_local_validity" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.check_local_validity" class="fnname">check_local_validity</a><Pk, Ctx>(<br> ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, ScriptContextError> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Check the consensus + policy(if not disabled) rules including the
64 ones for satisfaction <a href="../../bdk/keys/trait.ScriptContext.html#method.check_local_validity">Read more</a></p>
65 </div><h4 id="method.top_level_type_check" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.top_level_type_check" class="fnname">top_level_type_check</a><Pk, Ctx>(<br> ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Check whether the top-level is type B</p>
66 </div><h4 id="method.other_top_level_checks" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.other_top_level_checks" class="fnname">other_top_level_checks</a><Pk, Ctx>(<br> _ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Other top level checks that are context specific</p>
67 </div><h4 id="method.top_level_checks" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ScriptContext.html#method.top_level_checks" class="fnname">top_level_checks</a><Pk, Ctx>(ms: &<a class="struct" href="../../bdk/descriptor/struct.Miniscript.html" title="struct bdk::descriptor::Miniscript">Miniscript</a><Pk, Ctx>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error> <span class="where fmt-newline">where<br> Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br> Pk: <a class="trait" href="../../bdk/descriptor/trait.MiniscriptKey.html" title="trait bdk::descriptor::MiniscriptKey">MiniscriptKey</a>, </span></code></h4><div class='docblock hidden'><p>Check top level consensus rules.</p>
68 </div></div><h3 id="impl-StructuralEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralEq.html" title="trait core::marker::StructuralEq">StructuralEq</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-StructuralEq" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../bdk/descriptor/enum.Segwitv0.html" title="enum bdk::descriptor::Segwitv0">Segwitv0</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
69 </div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
70 </div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
71 </div></div><h3 id="impl-Equivalent%3CK%3E" class="impl"><code class="in-band">impl<Q, K> <a class="trait" href="https://docs.rs/indexmap/1/indexmap/equivalent/trait.Equivalent.html" title="trait indexmap::equivalent::Equivalent">Equivalent</a><K> for Q <span class="where fmt-newline">where<br> K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><Q> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Equivalent%3CK%3E" class="anchor"></a><a class="srclink" href="https://docs.rs/indexmap/1/src/indexmap/equivalent.rs.html#18-27" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.equivalent" class="method hidden"><code>pub fn <a href="https://docs.rs/indexmap/1/indexmap/equivalent/trait.Equivalent.html#tymethod.equivalent" class="fnname">equivalent</a>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>K) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="https://docs.rs/indexmap/1/src/indexmap/equivalent.rs.html#24-26" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compare self to <code>key</code> and return <code>true</code> if they are equal.</p>
72 </div></div><h3 id="impl-ExtScriptContext" class="impl"><code class="in-band">impl<Ctx> <a class="trait" href="../../bdk/keys/trait.ExtScriptContext.html" title="trait bdk::keys::ExtScriptContext">ExtScriptContext</a> for Ctx <span class="where fmt-newline">where<br> Ctx: 'static + <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>, </span></code><a href="#impl-ExtScriptContext" class="anchor"></a><a class="srclink" href="../../src/bdk/keys/mod.rs.html#166-174" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.as_enum" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ExtScriptContext.html#tymethod.as_enum" class="fnname">as_enum</a>() -> <a class="enum" href="../../bdk/keys/enum.ScriptContextEnum.html" title="enum bdk::keys::ScriptContextEnum">ScriptContextEnum</a></code><a class="srclink" href="../../src/bdk/keys/mod.rs.html#167-173" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the <a href="../../bdk/keys/trait.ScriptContext.html" title="ScriptContext"><code>ScriptContext</code></a> as a <a href="../../bdk/keys/enum.ScriptContextEnum.html" title="ScriptContextEnum"><code>ScriptContextEnum</code></a></p>
73 </div><h4 id="method.is_legacy" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ExtScriptContext.html#method.is_legacy" class="fnname">is_legacy</a>() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/bdk/keys/mod.rs.html#156-158" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns whether the script context is <a href="../../bdk/descriptor/enum.Legacy.html"><code>Legacy</code></a></p>
74 </div><h4 id="method.is_segwit_v0" class="method hidden"><code>pub fn <a href="../../bdk/keys/trait.ExtScriptContext.html#method.is_segwit_v0" class="fnname">is_segwit_v0</a>() -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/bdk/keys/mod.rs.html#161-163" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns whether the script context is <a href="../../bdk/descriptor/enum.Segwitv0.html"><code>Segwitv0</code></a></p>
75 </div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
76 </div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
77 <code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
78 </div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
79 <code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
80 </div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#248" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#129-131" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
81 <code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
82 </div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#166-168" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
83 <code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
84 </div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
85 </div></div><h3 id="impl-Pointable" class="impl"><code class="in-band">impl<T> Pointable for T</code><a href="#impl-Pointable" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedconstant.ALIGN" class="associatedconstant hidden"><code>pub const <a href="#associatedconstant.ALIGN" class="constant"><b>ALIGN</b></a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h4><div class='docblock hidden'><p>The alignment of pointer.</p>
86 </div><h4 id="associatedtype.Init" class="type"><code>type <a href="#associatedtype.Init" class="type">Init</a> = T</code></h4><div class='docblock'><p>The type for initializers.</p>
87 </div><h4 id="method.init" class="method hidden"><code>pub unsafe fn <a href="#method.init" class="fnname">init</a>(init: <T as Pointable>::Init) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h4><div class='docblock hidden'><p>Initializes a with the given initializer. <a href="#tymethod.init">Read more</a></p>
88 </div><h4 id="method.deref" class="method hidden"><code>pub unsafe fn <a href="#method.deref" class="fnname">deref</a><'a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T</code></h4><div class='docblock hidden'><p>Dereferences the given pointer. <a href="#tymethod.deref">Read more</a></p>
89 </div><h4 id="method.deref_mut" class="method hidden"><code>pub unsafe fn <a href="#method.deref_mut" class="fnname">deref_mut</a><'a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>T</code></h4><div class='docblock hidden'><p>Mutably dereferences the given pointer. <a href="#tymethod.deref_mut">Read more</a></p>
90 </div><h4 id="method.drop" class="method hidden"><code>pub unsafe fn <a href="#method.drop" class="fnname">drop</a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></h4><div class='docblock hidden'><p>Drops the object pointed to by the given pointer. <a href="#tymethod.drop">Read more</a></p>
91 </div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl<T> Same<T> for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
92 </div></div><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
93 </div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
94 </div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
95 </details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
96 </div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
97 </div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
98 </div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
99 </div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
100 </div></div><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.vzip" class="method hidden"><code>pub fn <a href="#method.vzip" class="fnname">vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "bdk";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>