168 lines
37 KiB
HTML
168 lines
37 KiB
HTML
<!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="Representation of a child process spawned onto an event loop."><title>Child in tokio::process - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tokio" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.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"><!--[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="#">Child</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.49.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Child</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#caveats" title="Caveats">Caveats</a></li></ul><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.stderr" title="stderr">stderr</a></li><li><a href="#structfield.stdin" title="stdin">stdin</a></li><li><a href="#structfield.stdout" title="stdout">stdout</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.id" title="id">id</a></li><li><a href="#method.kill" title="kill">kill</a></li><li><a href="#method.start_kill" title="start_kill">start_kill</a></li><li><a href="#method.try_wait" title="try_wait">try_wait</a></li><li><a href="#method.wait" title="wait">wait</a></li><li><a href="#method.wait_with_output" title="wait_with_output">wait_with_output</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-Child" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Child" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-Child" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-Child" title="Freeze">Freeze</a></li><li><a href="#impl-Send-for-Child" title="Send">Send</a></li><li><a href="#impl-Sync-for-Child" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Child" title="Unpin">Unpin</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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>process</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">process</a></div><h1>Struct <span class="struct">Child</span> <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/tokio/process/mod.rs.html#1176-1213">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Child {
|
||
pub stdin: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.ChildStdin.html" title="struct tokio::process::ChildStdin">ChildStdin</a>>,
|
||
pub stdout: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.ChildStdout.html" title="struct tokio::process::ChildStdout">ChildStdout</a>>,
|
||
pub stderr: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.ChildStderr.html" title="struct tokio::process::ChildStderr">ChildStderr</a>>,
|
||
<span class="comment">/* private fields */</span>
|
||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Representation of a child process spawned onto an event loop.</p>
|
||
<h2 id="caveats"><a class="doc-anchor" href="#caveats">§</a>Caveats</h2>
|
||
<p>Similar to the behavior to the standard library, and unlike the futures
|
||
paradigm of dropping-implies-cancellation, a spawned process will, by
|
||
default, continue to execute even after the <code>Child</code> handle has been dropped.</p>
|
||
<p>The <code>Command::kill_on_drop</code> method can be used to modify this behavior
|
||
and kill the child process if the <code>Child</code> wrapper is dropped before it
|
||
has exited.</p>
|
||
</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.stdin" class="structfield section-header"><a href="#structfield.stdin" class="anchor field">§</a><code>stdin: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.ChildStdin.html" title="struct tokio::process::ChildStdin">ChildStdin</a>></code></span><div class="docblock"><p>The handle for writing to the child’s standard input (stdin), if it has
|
||
been captured. To avoid partially moving the <code>child</code> and thus blocking
|
||
yourself from calling functions on <code>child</code> while using <code>stdin</code>, you might
|
||
find it helpful to do:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>stdin = child.stdin.take().unwrap();</code></pre></div></div><span id="structfield.stdout" class="structfield section-header"><a href="#structfield.stdout" class="anchor field">§</a><code>stdout: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.ChildStdout.html" title="struct tokio::process::ChildStdout">ChildStdout</a>></code></span><div class="docblock"><p>The handle for reading from the child’s standard output (stdout), if it
|
||
has been captured. You might find it helpful to do</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>stdout = child.stdout.take().unwrap();</code></pre></div>
|
||
<p>to avoid partially moving the <code>child</code> and thus blocking yourself from calling
|
||
functions on <code>child</code> while using <code>stdout</code>.</p>
|
||
</div><span id="structfield.stderr" class="structfield section-header"><a href="#structfield.stderr" class="anchor field">§</a><code>stderr: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.ChildStderr.html" title="struct tokio::process::ChildStderr">ChildStderr</a>></code></span><div class="docblock"><p>The handle for reading from the child’s standard error (stderr), if it
|
||
has been captured. You might find it helpful to do</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>stderr = child.stderr.take().unwrap();</code></pre></div>
|
||
<p>to avoid partially moving the <code>child</code> and thus blocking yourself from calling
|
||
functions on <code>child</code> while using <code>stderr</code>.</p>
|
||
</div><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-Child" class="impl"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1215-1475">Source</a><a href="#impl-Child" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Child.html" title="struct tokio::process::Child">Child</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.id" class="method"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1222-1227">Source</a><h4 class="code-header">pub fn <a href="#method.id" class="fn">id</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u32.html">u32</a>></h4></section></summary><div class="docblock"><p>Returns the OS-assigned process identifier associated with this child
|
||
while it is still running.</p>
|
||
<p>Once the child has been polled to completion this will return <code>None</code>.
|
||
This is done to avoid confusion on platforms like Unix where the OS
|
||
identifier could be reused once the process has completed.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.start_kill" class="method"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1247-1252">Source</a><h4 class="code-header">pub fn <a href="#method.start_kill" class="fn">start_kill</a>(&mut self) -> <a class="type" href="https://doc.rust-lang.org/1.93.1/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>></h4></section></summary><div class="docblock"><p>Attempts to force the child to exit, but does not wait for the request
|
||
to take effect.</p>
|
||
<p>On Unix platforms, this is the equivalent to sending a <code>SIGKILL</code>. Note
|
||
that on Unix platforms it is possible for a zombie process to remain
|
||
after a kill is sent; to avoid this, the caller should ensure that either
|
||
<code>child.wait().await</code> or <code>child.try_wait()</code> is invoked successfully.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.kill" class="method"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1326-1330">Source</a><h4 class="code-header">pub async fn <a href="#method.kill" class="fn">kill</a>(&mut self) -> <a class="type" href="https://doc.rust-lang.org/1.93.1/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>></h4></section></summary><div class="docblock"><p>Forces the child to exit.</p>
|
||
<p>This is equivalent to sending a <code>SIGKILL</code> on unix platforms
|
||
followed by <a href="struct.Child.html#method.wait" title="method tokio::process::Child::wait"><code>wait</code></a>.</p>
|
||
<p>Note: std version of <a href="https://doc.rust-lang.org/1.93.1/std/process/struct.Child.html#method.kill" title="method std::process::Child::kill"><code>Child::kill</code></a> does not <code>wait</code>.
|
||
For an equivalent of <code>Child::kill</code> in the standard library,
|
||
use <a href="struct.Child.html#method.start_kill" title="method tokio::process::Child::start_kill"><code>start_kill</code></a>.</p>
|
||
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
|
||
<p>If the child has to be killed remotely, it is possible to do it using
|
||
a combination of the select! macro and a <code>oneshot</code> channel. In the following
|
||
example, the child will run until completion unless a message is sent on
|
||
the <code>oneshot</code> channel. If that happens, the child is killed immediately
|
||
using the <code>.kill()</code> method.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::process::Command;
|
||
<span class="kw">use </span>tokio::sync::oneshot::channel;
|
||
|
||
<span class="attr">#[tokio::main]
|
||
</span><span class="kw">async fn </span>main() {
|
||
<span class="kw">let </span>(send, recv) = channel::<()>();
|
||
<span class="kw">let </span><span class="kw-2">mut </span>child = Command::new(<span class="string">"sleep"</span>).arg(<span class="string">"1"</span>).spawn().unwrap();
|
||
tokio::spawn(<span class="kw">async move </span>{ send.send(()) });
|
||
<span class="macro">tokio::select!</span> {
|
||
<span class="kw">_ </span>= child.wait() => {}
|
||
<span class="kw">_ </span>= recv => child.kill().<span class="kw">await</span>.expect(<span class="string">"kill failed"</span>),
|
||
}
|
||
}</code></pre></div>
|
||
<p>You can also interact with the child’s standard I/O. For example, you can
|
||
read its stdout while waiting for it to exit.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>
|
||
<span class="attr">#[tokio::main]
|
||
</span><span class="kw">async fn </span>main() {
|
||
<span class="kw">let </span>(_tx, rx) = channel::<()>();
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>child = Command::new(<span class="string">"echo"</span>)
|
||
.arg(<span class="string">"Hello World!"</span>)
|
||
.stdout(Stdio::piped())
|
||
.spawn()
|
||
.unwrap();
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>stdout = child.stdout.take().expect(<span class="string">"stdout is not captured"</span>);
|
||
|
||
<span class="kw">let </span>read_stdout = tokio::spawn(<span class="kw">async move </span>{
|
||
<span class="kw">let </span><span class="kw-2">mut </span>buff = Vec::new();
|
||
<span class="kw">let _ </span>= stdout.read_to_end(<span class="kw-2">&mut </span>buff).<span class="kw">await</span>;
|
||
|
||
buff
|
||
});
|
||
|
||
<span class="macro">tokio::select!</span> {
|
||
<span class="kw">_ </span>= child.wait() => {}
|
||
<span class="kw">_ </span>= rx => { child.kill().<span class="kw">await</span>.expect(<span class="string">"kill failed"</span>) },
|
||
}
|
||
|
||
<span class="kw">let </span>buff = read_stdout.<span class="kw">await</span>.unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(buff, <span class="string">b"Hello World!\n"</span>);
|
||
}</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.wait" class="method"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1379-1396">Source</a><h4 class="code-header">pub async fn <a href="#method.wait" class="fn">wait</a>(&mut self) -> <a class="type" href="https://doc.rust-lang.org/1.93.1/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.93.1/std/process/struct.ExitStatus.html" title="struct std::process::ExitStatus">ExitStatus</a>></h4></section></summary><div class="docblock"><p>Waits for the child to exit completely, returning the status that it
|
||
exited with. This function will continue to have the same return value
|
||
after it has been called at least once.</p>
|
||
<p>The stdin handle to the child process, if any, will be closed
|
||
before waiting. This helps avoid deadlock: it ensures that the
|
||
child does not block waiting for input from the parent, while
|
||
the parent waits for the child to exit.</p>
|
||
<p>If the caller wishes to explicitly control when the child’s stdin
|
||
handle is closed, they may <code>.take()</code> it before calling <code>.wait()</code>:</p>
|
||
<h5 id="cancel-safety"><a class="doc-anchor" href="#cancel-safety">§</a>Cancel safety</h5>
|
||
<p>This function is cancel safe.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::AsyncWriteExt;
|
||
<span class="kw">use </span>tokio::process::Command;
|
||
<span class="kw">use </span>std::process::Stdio;
|
||
|
||
<span class="attr">#[tokio::main]
|
||
</span><span class="kw">async fn </span>main() {
|
||
<span class="kw">let </span><span class="kw-2">mut </span>child = Command::new(<span class="string">"cat"</span>)
|
||
.stdin(Stdio::piped())
|
||
.spawn()
|
||
.unwrap();
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>stdin = child.stdin.take().unwrap();
|
||
tokio::spawn(<span class="kw">async move </span>{
|
||
<span class="comment">// do something with stdin here...
|
||
</span>stdin.write_all(<span class="string">b"hello world\n"</span>).<span class="kw">await</span>.unwrap();
|
||
|
||
<span class="comment">// then drop when finished
|
||
</span>drop(stdin);
|
||
});
|
||
|
||
<span class="comment">// wait for the process to complete
|
||
</span><span class="kw">let _ </span>= child.wait().<span class="kw">await</span>;
|
||
}</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_wait" class="method"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1413-1428">Source</a><h4 class="code-header">pub fn <a href="#method.try_wait" class="fn">try_wait</a>(&mut self) -> <a class="type" href="https://doc.rust-lang.org/1.93.1/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.93.1/std/process/struct.ExitStatus.html" title="struct std::process::ExitStatus">ExitStatus</a>>></h4></section></summary><div class="docblock"><p>Attempts to collect the exit status of the child if it has already
|
||
exited.</p>
|
||
<p>This function will not block the calling thread and will only
|
||
check to see if the child process has exited or not. If the child has
|
||
exited then on Unix the process ID is reaped. This function is
|
||
guaranteed to repeatedly return a successful exit status so long as the
|
||
child has already exited.</p>
|
||
<p>If the child has exited, then <code>Ok(Some(status))</code> is returned. If the
|
||
exit status is not available at this time then <code>Ok(None)</code> is returned.
|
||
If an error occurs, then that error is returned.</p>
|
||
<p>Note that unlike <code>wait</code>, this function will not attempt to drop stdin,
|
||
nor will it wake the current task if the child exits.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.wait_with_output" class="method"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1446-1474">Source</a><h4 class="code-header">pub async fn <a href="#method.wait_with_output" class="fn">wait_with_output</a>(self) -> <a class="type" href="https://doc.rust-lang.org/1.93.1/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.93.1/std/process/struct.Output.html" title="struct std::process::Output">Output</a>></h4></section></summary><div class="docblock"><p>Returns a future that will resolve to an <code>Output</code>, containing the exit
|
||
status, stdout, and stderr of the child process.</p>
|
||
<p>The returned future will simultaneously waits for the child to exit and
|
||
collect all remaining output on the stdout/stderr handles, returning an
|
||
<code>Output</code> instance.</p>
|
||
<p>The stdin handle to the child process, if any, will be closed before
|
||
waiting. This helps avoid deadlock: it ensures that the child does not
|
||
block waiting for input from the parent, while the parent waits for the
|
||
child to exit.</p>
|
||
<p>By default, stdin, stdout and stderr are inherited from the parent. In
|
||
order to capture the output into this <code>Output</code> it is necessary to create
|
||
new pipes between parent and child. Use <code>stdout(Stdio::piped())</code> or
|
||
<code>stderr(Stdio::piped())</code>, respectively, when creating a <code>Command</code>.</p>
|
||
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Child" class="impl"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1175">Source</a><a href="#impl-Debug-for-Child" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Child.html" title="struct tokio::process::Child">Child</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/tokio/process/mod.rs.html#1175">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.93.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></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-Freeze-for-Child" class="impl"><a href="#impl-Freeze-for-Child" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Child.html" title="struct tokio::process::Child">Child</a></h3></section><section id="impl-RefUnwindSafe-for-Child" class="impl"><a href="#impl-RefUnwindSafe-for-Child" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Child.html" title="struct tokio::process::Child">Child</a></h3></section><section id="impl-Send-for-Child" class="impl"><a href="#impl-Send-for-Child" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Child.html" title="struct tokio::process::Child">Child</a></h3></section><section id="impl-Sync-for-Child" class="impl"><a href="#impl-Sync-for-Child" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Child.html" title="struct tokio::process::Child">Child</a></h3></section><section id="impl-Unpin-for-Child" class="impl"><a href="#impl-Unpin-for-Child" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Child.html" title="struct tokio::process::Child">Child</a></h3></section><section id="impl-UnwindSafe-for-Child" class="impl"><a href="#impl-UnwindSafe-for-Child" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Child.html" title="struct tokio::process::Child">Child</a></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.93.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.93.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.93.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.93.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.93.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.93.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.93.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<T> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.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.93.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.93.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.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.93.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<T> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.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.93.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.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.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.93.1/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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.93.1/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> 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.93.1/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</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.93.1/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> 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.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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.93.1/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</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.93.1/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.93.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.93.1/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></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.93.1/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</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.93.1/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.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.93.1/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> |