Files
greptimedb/common_batcher/pending_worker/struct.PendingWorker.html
T

46 lines
30 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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="Batch state for one grouping key, independent of the caller’s event loop."><title>PendingWorker in common_batcher::pending_worker - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-1ed95124.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_batcher" data-themes="" data-resource-suffix="" data-rustdoc-version="1.98.1 (48a229cea 2026-09-01)" data-channel="1.98.1" data-search-js="search-9944d736.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-417ebf0a.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">PendingWorker</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_batcher/index.html">common_<wbr>batcher</a><span class="version">1.4.0-alpha.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Pending<wbr>Worker</a></h2><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.batch" title="batch">batch</a></li><li><a href="#structfield.flush_policy" title="flush_policy">flush_policy</a></li><li><a href="#structfield.flush_timer" title="flush_timer">flush_timer</a></li></ul><h3><a href="#implementations">Associated Functions</a></h3><ul class="block method"><li><a href="#method.new" title="new">new</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.is_empty" title="is_empty">is_empty</a></li><li><a href="#method.refresh_deadline" title="refresh_deadline">refresh_deadline</a></li><li><a href="#method.submit" title="submit">submit</a></li><li><a href="#method.take_pending" title="take_pending">take_pending</a></li><li><a href="#method.take_ready" title="take_ready">take_ready</a></li><li><a href="#method.total_rows" title="total_rows">total_rows</a></li><li><a href="#method.wait_flush" title="wait_flush">wait_flush</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-PendingWorker%3CT,+P%3E" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-PendingWorker%3CT,+P%3E" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-PendingWorker%3CT,+P%3E" title="Freeze">Freeze</a></li><li><a href="#impl-Send-for-PendingWorker%3CT,+P%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-PendingWorker%3CT,+P%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-PendingWorker%3CT,+P%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnsafeUnpin-for-PendingWorker%3CT,+P%3E" title="UnsafeUnpin">UnsafeUnpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>batcher::<wbr>pending_<wbr>worker</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_batcher</a>::<wbr><a href="index.html">pending_worker</a></div><h1>Struct <span class="struct">Pending<wbr>Worker</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_batcher/pending_worker.rs.html#26-30">Source</a> </span></div><pre class="rust item-decl"><code>pub struct PendingWorker&lt;T, P&gt; {
batch: <a class="struct" href="../pending_batch/struct.PendingBatch.html" title="struct common_batcher::pending_batch::PendingBatch">PendingBatch</a>&lt;T&gt;,
flush_policy: P,
flush_timer: <a class="struct" href="../flush_timer/struct.FlushTimer.html" title="struct common_batcher::flush_timer::FlushTimer">FlushTimer</a>,
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Batch state for one grouping key, independent of the caller’s event loop.</p>
<p>The caller owns channels, idle/shutdown decisions, execution limits, task
spawning and business completion. Taking a batch transfers its items to the
caller; no background task is started by this worker.</p>
</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.batch" class="structfield section-header"><a href="#structfield.batch" class="anchor field">§</a><code>batch: <a class="struct" href="../pending_batch/struct.PendingBatch.html" title="struct common_batcher::pending_batch::PendingBatch">PendingBatch</a>&lt;T&gt;</code></span><span id="structfield.flush_policy" class="structfield section-header"><a href="#structfield.flush_policy" class="anchor field">§</a><code>flush_policy: P</code></span><span id="structfield.flush_timer" class="structfield section-header"><a href="#structfield.flush_timer" class="anchor field">§</a><code>flush_timer: <a class="struct" href="../flush_timer/struct.FlushTimer.html" title="struct common_batcher::flush_timer::FlushTimer">FlushTimer</a></code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-PendingWorker%3CT,+P%3E" class="impl"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#32-73">Source</a><a href="#impl-PendingWorker%3CT,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, P&gt; <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#34-40">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(flush_policy: P) -&gt; Self</h4></section></summary><div class="docblock"><p>Creates an empty worker without starting a timer or runtime task.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#43-45">Source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns whether the worker has no submissions, including zero-row items.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.total_rows" class="method"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#48-50">Source</a><h4 class="code-header">pub fn <a href="#method.total_rows" class="fn">total_rows</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the pending row count before ownership is transferred to the caller.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.wait_flush" class="method"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#57-59">Source</a><h4 class="code-header">pub async fn <a href="#method.wait_flush" class="fn">wait_flush</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Waits for a timer wakeup without taking or executing the batch.</p>
<p>Cancellation is safe: selecting another event does not lose items or
reset the deadline. After a wakeup, call <a href="struct.PendingWorker.html#method.take_ready" title="method common_batcher::pending_worker::PendingWorker::take_ready"><code>Self::take_ready</code></a> with
<a href="../flush_policy/enum.FlushTrigger.html#variant.Deadline" title="variant common_batcher::flush_policy::FlushTrigger::Deadline"><code>FlushTrigger::Deadline</code></a>. An empty or unarmed worker stays pending.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.take_pending" class="method"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#65-72">Source</a><h4 class="code-header">pub fn <a href="#method.take_pending" class="fn">take_pending</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;&gt;</h4></section></summary><div class="docblock"><p>Takes all pending submissions regardless of policy, for example on shutdown.</p>
<p>Returns <code>None</code> for an empty batch. The caller decides whether to execute
inline, acquire a flush permit or discard the returned items.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PendingWorker%3CT,+P%3E-1" class="impl"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#75-115">Source</a><a href="#impl-PendingWorker%3CT,+P%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;T, P: <a class="trait" href="../flush_policy/trait.FlushPolicy.html" title="trait common_batcher::flush_policy::FlushPolicy">FlushPolicy</a>&gt; <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.submit" class="method"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#85-88">Source</a><h4 class="code-header">pub fn <a href="#method.submit" class="fn">submit</a>(&amp;mut self, item: T, total_rows: <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Appends one complete submission and arms the policy’s deadline.</p>
<p>Call <a href="struct.PendingWorker.html#method.take_ready" title="method common_batcher::pending_worker::PendingWorker::take_ready"><code>Self::take_ready</code></a> with <a href="../flush_policy/enum.FlushTrigger.html#variant.Submission" title="variant common_batcher::flush_policy::FlushTrigger::Submission"><code>FlushTrigger::Submission</code></a> afterwards to
check whether this submission triggered a flush. Timer-backed policies
require a Tokio runtime with time enabled.</p>
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
<p>Panics if arming a new timer outside a Tokio runtime with time enabled.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.take_ready" class="method"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#94-105">Source</a><h4 class="code-header">pub fn <a href="#method.take_ready" class="fn">take_ready</a>(&amp;mut self, trigger: <a class="enum" href="../flush_policy/enum.FlushTrigger.html" title="enum common_batcher::flush_policy::FlushTrigger">FlushTrigger</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;T&gt;&gt;</h4></section></summary><div class="docblock"><p>Takes the batch only when the policy permits flushing for this event.</p>
<p>Like <a href="struct.PendingWorker.html#method.submit" title="method common_batcher::pending_worker::PendingWorker::submit"><code>Self::submit</code></a>, this may arm a timer and requires a time-enabled
Tokio runtime when the policy starts using deadlines.</p>
</div></details><section id="method.refresh_deadline" class="method"><a class="src rightside" href="../../src/common_batcher/pending_worker.rs.html#107-114">Source</a><h4 class="code-header">fn <a href="#method.refresh_deadline" class="fn">refresh_deadline</a>(&amp;mut self)</h4></section></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-PendingWorker%3CT,+P%3E" class="impl"><a href="#impl-RefUnwindSafe-for-PendingWorker%3CT,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, P&gt; !<a class="trait" href="https://doc.rust-lang.org/1.98.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;</h3></section><section id="impl-UnwindSafe-for-PendingWorker%3CT,+P%3E" class="impl"><a href="#impl-UnwindSafe-for-PendingWorker%3CT,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, P&gt; !<a class="trait" href="https://doc.rust-lang.org/1.98.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;</h3></section><section id="impl-Freeze-for-PendingWorker%3CT,+P%3E" class="impl"><a href="#impl-Freeze-for-PendingWorker%3CT,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, P&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a>,</div></h3></section><section id="impl-Send-for-PendingWorker%3CT,+P%3E" class="impl"><a href="#impl-Send-for-PendingWorker%3CT,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, P&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
T: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section><section id="impl-Sync-for-PendingWorker%3CT,+P%3E" class="impl"><a href="#impl-Sync-for-PendingWorker%3CT,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, P&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
T: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section><section id="impl-Unpin-for-PendingWorker%3CT,+P%3E" class="impl"><a href="#impl-Unpin-for-PendingWorker%3CT,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, P&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
T: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnsafeUnpin-for-PendingWorker%3CT,+P%3E" class="impl"><a href="#impl-UnsafeUnpin-for-PendingWorker%3CT,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, P&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.UnsafeUnpin.html" title="trait core::marker::UnsafeUnpin">UnsafeUnpin</a> for <a class="struct" href="struct.PendingWorker.html" title="struct common_batcher::pending_worker::PendingWorker">PendingWorker</a>&lt;T, P&gt;<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.UnsafeUnpin.html" title="trait core::marker::UnsafeUnpin">UnsafeUnpin</a>,</div></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/any.rs.html#141">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/any.rs.html#142">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.98.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.98.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.98.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.98.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.98.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.98.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.98.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.98.1/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.98.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#787">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#790">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.98.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#769-771">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#779">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.98.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#829-831">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#833">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#836">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#813-815">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#817">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.98.1/src/core/convert/mod.rs.html#820">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.98.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>