mango-v4/rs/doc/mango_v4_client/struct.TransactionBuilder.html

15 lines
74 KiB
HTML
Raw Normal View History

<!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 `TransactionBuilder` struct in crate `mango_v4_client`."><meta name="keywords" content="rust, rustlang, rust-lang, TransactionBuilder"><title>TransactionBuilder in mango_v4_client - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../mango_v4_client/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../mango_v4_client/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">TransactionBuilder</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><ul><li><a href="#structfield.address_lookup_tables">address_lookup_tables</a></li><li><a href="#structfield.config">config</a></li><li><a href="#structfield.instructions">instructions</a></li><li><a href="#structfield.payer">payer</a></li><li><a href="#structfield.signers">signers</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><ul><li><a href="#method.send">send</a></li><li><a href="#method.send_and_confirm">send_and_confirm</a></li><li><a href="#method.transaction">transaction</a></li><li><a href="#method.transaction_size">transaction_size</a></li><li><a href="#method.transaction_with_blockhash">transaction_with_blockhash</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><a href="#impl-RefUnwindSafe-for-TransactionBuilder">RefUnwindSafe</a></li><li><a href="#impl-Send-for-TransactionBuilder">Send</a></li><li><a href="#impl-Sync-for-TransactionBuilder">Sync</a></li><li><a href="#impl-Unpin-for-TransactionBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-TransactionBuilder">UnwindSafe</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><ul><li><a href="#impl-Any-for-TransactionBuilder">Any</a></li><li><a href="#impl-AsTaggedExplicit%3C%27a%2C%20E%3E-for-TransactionBuilder">AsTaggedExplicit&lt;&#39;a, E&gt;</a></li><li><a href="#impl-AsTaggedImplicit%3C%27a%2C%20E%3E-for-TransactionBuilder">AsTaggedImplicit&lt;&#39;a, E&gt;<
pub instructions: <a class="struct" href="https://doc.rust-lang.org/1.65.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Instruction&gt;,
pub address_lookup_tables: <a class="struct" href="https://doc.rust-lang.org/1.65.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;AddressLookupTableAccount&gt;,
pub signers: <a class="struct" href="https://doc.rust-lang.org/1.65.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.65.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;Keypair&gt;&gt;,
pub payer: Pubkey,
pub config: <a class="struct" href="struct.TransactionBuilderConfig.html" title="struct mango_v4_client::TransactionBuilderConfig">TransactionBuilderConfig</a>,
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.instructions" class="structfield small-section-header"><a href="#structfield.instructions" class="anchor field"></a><code>instructions: <a class="struct" href="https://doc.rust-lang.org/1.65.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Instruction&gt;</code></span><span id="structfield.address_lookup_tables" class="structfield small-section-header"><a href="#structfield.address_lookup_tables" class="anchor field"></a><code>address_lookup_tables: <a class="struct" href="https://doc.rust-lang.org/1.65.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;AddressLookupTableAccount&gt;</code></span><span id="structfield.signers" class="structfield small-section-header"><a href="#structfield.signers" class="anchor field"></a><code>signers: <a class="struct" href="https://doc.rust-lang.org/1.65.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.65.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;Keypair&gt;&gt;</code></span><span id="structfield.payer" class="structfield small-section-header"><a href="#structfield.payer" class="anchor field"></a><code>payer: Pubkey</code></span><span id="structfield.config" class="structfield small-section-header"><a href="#structfield.config" class="anchor field"></a><code>config: <a class="struct" href="struct.TransactionBuilderConfig.html" title="struct mango_v4_client::TransactionBuilderConfig">TransactionBuilderConfig</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-TransactionBuilder" class="impl has-srclink"><a class="srclink rightside" href="../src/mango_v4_client/client.rs.html#1555-1631">source</a><a href="#impl-TransactionBuilder" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.TransactionBuilder.html" title="struct mango_v4_client::TransactionBuilder">TransactionBuilder</a></h3></section></summary><div class="impl-items"><section id="method.transaction" class="method has-srclink"><a class="srclink rightside" href="../src/mango_v4_client/client.rs.html#1556-1562">source</a><h4 class="code-header">pub async fn <a href="#method.transaction" class="fnname">transaction</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;rpc: &amp;RpcClientAsync<br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.66/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;VersionedTransaction&gt;</h4></section><section id="method.transaction_with_blockhash" class="method has-srclink"><a class="srclink rightside" href="../src/mango_v4_client/client.rs.html#1564-1593">source</a><h4 class="code-header">pub fn <a href="#method.transaction_with_blockhash" class="fnname">transaction_with_blockhash</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;blockhash: Hash<br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.66/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;VersionedTransaction&gt;</h4></section><section id="method.send" class="method has-srclink"><a class="srclink rightside" href="../src/mango_v4_client/client.rs.html#1597-1603">source</a><h4 class="code-header">pub async fn <a href="#method.send" class="fnname">send</a>(&amp;self, client: &amp;<a class="struct" href="struct.Client.html" title="struct mango_v4_client::Client">Client</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.66/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;Signature&gt;</h4></section><section id="method.send_and_confirm" class="method has-srclink"><a class="srclink rightside" href="../src/mango_v4_client/client.rs.html#1605-1612">source</a><h4 class="code-header">pub async fn <a href="#method.send_and_co
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Instrument-for-TransactionBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#276">source</a><a href="#impl-Instrument-for-TransactionBuilder" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#82">source</a><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the provided <a href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html" title="Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#121">source</a><a href="#method.in_current_span" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the <a href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html#method.current">current</a> <a href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-TransactionBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.65.0/src/core/convert/mod.rs.html#543">source</a><a href="#impl-Into%3CU%3E-for-TransactionBuilder" class="anchor"></a><h3 class="code-header in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.65.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/1.65.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.65.0/src/core/convert/mod.rs.html#551">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.65.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
2023-02-11 06:48:57 -08:00
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.65.0/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-IntoRequest%3CT%3E-for-TransactionBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tonic/0.8.3/src/tonic/request.rs.html#350">source</a><a href="#impl-IntoRequest%3CT%3E-for-TransactionBuilder" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/tonic/0.8.3/tonic/request/trait.IntoRequest.html" title="trait tonic::request::IntoRequest">IntoRequest</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_request" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tonic/0.8.3/src/tonic/request.rs.html#351">source</a><a href="#method.into_request" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tonic/0.8.3/tonic/request/trait.IntoRequest.html#tymethod.into_request" class="fnname">into_request</a>(self) -&gt; <a class="struct" href="https://docs.rs/tonic/0.8.3/tonic/request/struct.Request.html" title="struct tonic::request::Request">Request</a>&lt;T&gt;</h4></section></summary><div class='docblock'>Wrap the input message <code>T</code> in a <code>tonic::Request</code></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-LosslessTryInto%3CDst%3E-for-TransactionBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/fixed/~1.11/src/fixed/traits.rs.html#3054">source</a><a href="#impl-LosslessTryInto%3CDst%3E-for-TransactionBuilder" class="anchor"></a><h3 class="code-header in-band">impl&lt;Src, Dst&gt; <a class="trait" href="https://docs.rs/fixed/~1.11/fixed/traits/trait.LosslessTryInto.html" title="trait fixed::traits::LosslessTryInto">LosslessTryInto</a>&lt;Dst&gt; for Src<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Dst: <a class="trait" href="https://docs.rs/fixed/~1.11/fixed/traits/trait.LosslessTryFrom.html" title="trait fixed::traits::LosslessTryFrom">LosslessTryFrom</a>&lt;Src&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lossless_try_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/fixed/~1.11/src/fixed/traits.rs.html#3058">source</a><a href="#method.lossless_try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/fixed/~1.11/fixed/traits/trait.LosslessTryInto.html#tymethod.lossless_try_into" class="fnname">lossless_try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.65.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Dst&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-LosslessTryInto%3CDst%3E-for-TransactionBuilder-1" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/fixed/~1.11/src/fixed/traits.rs.html#3054">source</a><a href="#impl-LosslessTryInto%3CDst%3E-for-TransactionBuilder-1" class="anchor"></a><h3 class="code-header in-band">impl&lt;Src, Dst&gt; <a class="trait" href="https://docs.rs/fixed/~1.11/fixed/traits/trait.LosslessTryInto.html" title="trait fixed::traits::LosslessTryInto">LosslessTryInto</a>&lt;Dst&gt; for Src<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Dst: <a class="trait" href="https://docs.rs/fixed/~1.11/fixed/traits/trait.LosslessTryFrom.html" title="trait fixed::traits::LosslessTryFrom">LosslessTryFrom</a>&lt;Src&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lossless_try_into-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/fixed/~1.11/src/fixed/traits.rs.html#3058">source</a><a href="#method.lossless_try_into-1" c
<a href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#221">source</a><a href="#method.with_current_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" class="fnname">with_current_subscriber</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Attaches the current <a href="https://docs.rs/tracing/0.1.37/tracing/dispatcher/index.html#setting-the-default-subscriber">default</a> <a href="https://docs.rs/tracing-core/0.1.22/tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a
<a href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-WrappingAs-for-TransactionBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/az/~1.2/src/az/lib.rs.html#818">source</a><a href="#impl-WrappingAs-for-TransactionBuilder" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/az/~1.2/az/trait.WrappingAs.html" title="trait az::WrappingAs">WrappingAs</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.wrapping_as" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/az/~1.2/src/az/lib.rs.html#821-823">source</a><a href="#method.wrapping_as" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/az/~1.2/az/trait.WrappingAs.html#tymethod.wrapping_as" class="fnname">wrapping_as</a>&lt;Dst&gt;(self) -&gt; Dst<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://docs.rs/az/~1.2/az/trait.WrappingCast.html" title="trait az::WrappingCast">WrappingCast</a>&lt;Dst&gt;,</span></h4></section></summary><div class='docblock'>Casts the value.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-WrappingCastFrom%3CSrc%3E-for-TransactionBuilder" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/az/~1.2/src/az/lib.rs.html#438">source</a><a href="#impl-WrappingCastFrom%3CSrc%3E-for-TransactionBuilder" class="anchor"></a><h3 class="code-header in-band">impl&lt;Src, Dst&gt; <a class="trait" href="https://docs.rs/az/~1.2/az/trait.WrappingCastFrom.html" title="trait az::WrappingCastFrom">WrappingCastFrom</a>&lt;Src&gt; for Dst<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Src: <a class="trait" href="https://docs.rs/az/~1.2/az/trait.WrappingCast.html" title="trait az::WrappingCast">WrappingCast</a>&lt;Dst&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.wrapping_cast_from" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/az/~1.2/src/az/lib.rs.html#441">source</a><a href="#method.wrapping_cast_from" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/az/~1.2/az/trait.WrappingCastFrom.html#tymethod.wrapping_cast_from" class="fnname">wrapping_cast_from</a>(src: Src) -&gt; Dst</h4></section></summary><div class='docblock'>Casts the value.</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="mango_v4_client" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0 (897e37553 2022-11-02)" ></div></body></html>