]> Untitled Git - bitcoindevkit.org/blob
17759d7720f39248e671c23c84de7b25ddfc77fc
[bitcoindevkit.org] /
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 `GeneratableDefaultOptions` trait in crate `bdk`."><meta name="keywords" content="rust, rustlang, rust-lang, GeneratableDefaultOptions"><title>bdk::keys::GeneratableDefaultOptions - 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 trait"><!--[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">&#9776;</div><a href='../../bdk/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait GeneratableDefaultOptions</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.generate_default">generate_default</a><a href="#method.generate_with_entropy_default">generate_with_entropy_default</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">bdk</a>::<wbr><a href="index.html">keys</a></p><script>window.sidebarCurrent = {name: "GeneratableDefaultOptions", ty: "trait", 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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/bdk/keys/mod.rs.html#449-465" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">bdk</a>::<wbr><a href="index.html">keys</a>::<wbr><a class="trait" href="">GeneratableDefaultOptions</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait GeneratableDefaultOptions&lt;Ctx&gt;: <a class="trait" href="../../bdk/keys/trait.GeneratableKey.html" title="trait bdk::keys::GeneratableKey">GeneratableKey</a>&lt;Ctx&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self::<a class="type" href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Options" title="type bdk::keys::GeneratableKey::Options">Options</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span>{
5 pub fn <a href="#method.generate_with_entropy_default" class="fnname">generate_with_entropy_default</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;entropy: Self::<a class="type" href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Entropy" title="type bdk::keys::GeneratableKey::Entropy">Entropy</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../bdk/keys/struct.GeneratedKey.html" title="struct bdk::keys::GeneratedKey">GeneratedKey</a>&lt;Self, Ctx&gt;, Self::<a class="type" href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Error" title="type bdk::keys::GeneratableKey::Error">Error</a>&gt; { ... }
6 <div class="item-spacer"></div> pub fn <a href="#method.generate_default" class="fnname">generate_default</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../bdk/keys/struct.GeneratedKey.html" title="struct bdk::keys::GeneratedKey">GeneratedKey</a>&lt;Self, Ctx&gt;, Self::<a class="type" href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Error" title="type bdk::keys::GeneratableKey::Error">Error</a>&gt; { ... }
7 }</pre></div><div class="docblock"><p>Trait that allows generating a key with the default options</p>
8 <p>This trait is automatically implemented if the <a href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Options" title="GeneratableKey::Options"><code>GeneratableKey::Options</code></a> implements <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="Default"><code>Default</code></a>.</p>
9 </div><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.generate_with_entropy_default" class="method"><code>pub fn <a href="#method.generate_with_entropy_default" class="fnname">generate_with_entropy_default</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;entropy: Self::<a class="type" href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Entropy" title="type bdk::keys::GeneratableKey::Entropy">Entropy</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../bdk/keys/struct.GeneratedKey.html" title="struct bdk::keys::GeneratedKey">GeneratedKey</a>&lt;Self, Ctx&gt;, Self::<a class="type" href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Error" title="type bdk::keys::GeneratableKey::Error">Error</a>&gt;</code><a class="srclink" href="../../src/bdk/keys/mod.rs.html#455-459" title="goto source code">[src]</a></h3><div class="docblock"><p>Generate a key with the default options and a given entropy</p>
10 </div><h3 id="method.generate_default" class="method"><code>pub fn <a href="#method.generate_default" class="fnname">generate_default</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../bdk/keys/struct.GeneratedKey.html" title="struct bdk::keys::GeneratedKey">GeneratedKey</a>&lt;Self, Ctx&gt;, Self::<a class="type" href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Error" title="type bdk::keys::GeneratableKey::Error">Error</a>&gt;</code><a class="srclink" href="../../src/bdk/keys/mod.rs.html#462-464" title="goto source code">[src]</a></h3><div class="docblock"><p>Generate a key with the default options and a random entropy</p>
11 </div></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-GeneratableDefaultOptions%3CCtx%3E" class="impl"><code class="in-band">impl&lt;Ctx, K&gt; GeneratableDefaultOptions&lt;Ctx&gt; for K <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Ctx: <a class="trait" href="../../bdk/keys/trait.ScriptContext.html" title="trait bdk::keys::ScriptContext">ScriptContext</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="../../bdk/keys/trait.GeneratableKey.html" title="trait bdk::keys::GeneratableKey">GeneratableKey</a>&lt;Ctx&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;K as <a class="trait" href="../../bdk/keys/trait.GeneratableKey.html" title="trait bdk::keys::GeneratableKey">GeneratableKey</a>&lt;Ctx&gt;&gt;::<a class="type" href="../../bdk/keys/trait.GeneratableKey.html#associatedtype.Options" title="type bdk::keys::GeneratableKey::Options">Options</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a href="#impl-GeneratableDefaultOptions%3CCtx%3E" class="anchor"></a><a class="srclink" href="../../src/bdk/keys/mod.rs.html#469-475" title="goto source code">[src]</a></h3><div class="docblock"><p>Automatic implementation of <a href="../../bdk/keys/trait.GeneratableDefaultOptions.html" title="GeneratableDefaultOptions"><code>GeneratableDefaultOptions</code></a> for <a href="../../bdk/keys/trait.GeneratableKey.html" title="GeneratableKey"><code>GeneratableKey</code></a>s where
12 <code>Options</code> implements <code>Default</code></p>
13 </div><div class="impl-items"></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/bdk/keys/trait.GeneratableDefaultOptions.js" async></script></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>