mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-18 00:38:14 +00:00
deploy: de38ae62916547ad097c066f94a32e9ba7790eeb
This commit is contained in:
commit
9a86359447
28502 changed files with 1261284 additions and 0 deletions
11
tokio/io/async_buf_read/trait.AsyncBufRead.html
Normal file
11
tokio/io/async_buf_read/trait.AsyncBufRead.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/trait.AsyncBufRead.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/trait.AsyncBufRead.html">../../../tokio/io/trait.AsyncBufRead.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/trait.AsyncBufRead.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/async_fd/struct.AsyncFd.html
Normal file
11
tokio/io/async_fd/struct.AsyncFd.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/unix/struct.AsyncFd.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/unix/struct.AsyncFd.html">../../../tokio/io/unix/struct.AsyncFd.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/unix/struct.AsyncFd.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/async_fd/struct.AsyncFdReadyGuard.html
Normal file
11
tokio/io/async_fd/struct.AsyncFdReadyGuard.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/unix/struct.AsyncFdReadyGuard.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/unix/struct.AsyncFdReadyGuard.html">../../../tokio/io/unix/struct.AsyncFdReadyGuard.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/unix/struct.AsyncFdReadyGuard.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/async_fd/struct.AsyncFdReadyMutGuard.html
Normal file
11
tokio/io/async_fd/struct.AsyncFdReadyMutGuard.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/unix/struct.AsyncFdReadyMutGuard.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/unix/struct.AsyncFdReadyMutGuard.html">../../../tokio/io/unix/struct.AsyncFdReadyMutGuard.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/unix/struct.AsyncFdReadyMutGuard.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/async_fd/struct.AsyncFdTryNewError.html
Normal file
11
tokio/io/async_fd/struct.AsyncFdTryNewError.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/unix/struct.AsyncFdTryNewError.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/unix/struct.AsyncFdTryNewError.html">../../../tokio/io/unix/struct.AsyncFdTryNewError.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/unix/struct.AsyncFdTryNewError.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/async_fd/struct.TryIoError.html
Normal file
11
tokio/io/async_fd/struct.TryIoError.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/unix/struct.TryIoError.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/unix/struct.TryIoError.html">../../../tokio/io/unix/struct.TryIoError.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/unix/struct.TryIoError.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/async_read/trait.AsyncRead.html
Normal file
11
tokio/io/async_read/trait.AsyncRead.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/trait.AsyncRead.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/trait.AsyncRead.html">../../../tokio/io/trait.AsyncRead.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/trait.AsyncRead.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/async_seek/trait.AsyncSeek.html
Normal file
11
tokio/io/async_seek/trait.AsyncSeek.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/trait.AsyncSeek.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/trait.AsyncSeek.html">../../../tokio/io/trait.AsyncSeek.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/trait.AsyncSeek.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/async_write/trait.AsyncWrite.html
Normal file
11
tokio/io/async_write/trait.AsyncWrite.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/trait.AsyncWrite.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/trait.AsyncWrite.html">../../../tokio/io/trait.AsyncWrite.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/trait.AsyncWrite.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
26
tokio/io/fn.copy.html
Normal file
26
tokio/io/fn.copy.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!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="Asynchronously copies the entire contents of a reader into a writer."><title>copy in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">copy</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#errors" title="Errors">Errors</a></li><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">copy</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/io/util/copy.rs.html#269-279">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn copy<'a, R, W>(reader: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut R</a>, writer: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut W</a>) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u64.html">u64</a>><div class="where">where
|
||||
R: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||||
W: <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Asynchronously copies the entire contents of a reader into a writer.</p>
|
||||
<p>This function returns a future that will continuously read data from
|
||||
<code>reader</code> and then write it into <code>writer</code> in a streaming fashion until
|
||||
<code>reader</code> returns EOF or fails.</p>
|
||||
<p>On success, the total number of bytes that were copied from <code>reader</code> to
|
||||
<code>writer</code> is returned.</p>
|
||||
<p>This is an asynchronous version of <a href="https://doc.rust-lang.org/1.84.1/std/io/copy/fn.copy.html" title="fn std::io::copy::copy"><code>std::io::copy</code></a>.</p>
|
||||
<p>A heap-allocated copy buffer with 8 KB is created to take data from the
|
||||
reader to the writer, check <a href="fn.copy_buf.html" title="fn tokio::io::copy_buf"><code>copy_buf</code></a> if you want an alternative for
|
||||
<a href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead"><code>AsyncBufRead</code></a>. You can use <code>copy_buf</code> with <a href="struct.BufReader.html" title="struct tokio::io::BufReader"><code>BufReader</code></a> to change the
|
||||
buffer capacity.</p>
|
||||
<h2 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h2>
|
||||
<p>The returned future will return an error immediately if any call to
|
||||
<code>poll_read</code> or <code>poll_write</code> returns an error.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>reader: <span class="kw-2">&</span>[u8] = <span class="string">b"hello"</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>writer: Vec<u8> = <span class="macro">vec!</span>[];
|
||||
|
||||
io::copy(<span class="kw-2">&mut </span>reader, <span class="kw-2">&mut </span>writer).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="kw-2">&</span><span class="string">b"hello"</span>[..], <span class="kw-2">&</span>writer[..]);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
26
tokio/io/fn.copy_bidirectional.html
Normal file
26
tokio/io/fn.copy_bidirectional.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!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="Copies data in both directions between `a` and `b`."><title>copy_bidirectional in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">copy_<wbr>bidirectional</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#errors" title="Errors">Errors</a></li><li><a href="#return-value" title="Return value">Return value</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">copy_bidirectional</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/io/util/copy_bidirectional.rs.html#75-87">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn copy_bidirectional<A, B>(
|
||||
a: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut A</a>,
|
||||
b: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut B</a>,
|
||||
) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>)><div class="where">where
|
||||
A: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> + <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||||
B: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> + <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Copies data in both directions between <code>a</code> and <code>b</code>.</p>
|
||||
<p>This function returns a future that will read from both streams,
|
||||
writing any data read to the opposing stream.
|
||||
This happens in both directions concurrently.</p>
|
||||
<p>If an EOF is observed on one stream, <a href="trait.AsyncWriteExt.html#method.shutdown" title="method tokio::io::AsyncWriteExt::shutdown"><code>shutdown()</code></a> will be invoked on
|
||||
the other, and reading from that stream will stop. Copying of data in
|
||||
the other direction will continue.</p>
|
||||
<p>The future will complete successfully once both directions of communication has been shut down.
|
||||
A direction is shut down when the reader reports EOF,
|
||||
at which point <a href="trait.AsyncWriteExt.html#method.shutdown" title="method tokio::io::AsyncWriteExt::shutdown"><code>shutdown()</code></a> is called on the corresponding writer. When finished,
|
||||
it will return a tuple of the number of bytes copied from a to b
|
||||
and the number of bytes copied from b to a, in that order.</p>
|
||||
<p>It uses two 8 KB buffers for transferring bytes between <code>a</code> and <code>b</code> by default.
|
||||
To set your own buffers sizes use <a href="fn.copy_bidirectional_with_sizes.html" title="fn tokio::io::copy_bidirectional_with_sizes"><code>copy_bidirectional_with_sizes()</code></a>.</p>
|
||||
<h2 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h2>
|
||||
<p>The future will immediately return an error if any IO operation on <code>a</code>
|
||||
or <code>b</code> returns an error. Some data read from either stream may be lost (not
|
||||
written to the other stream) in this case.</p>
|
||||
<h2 id="return-value"><a class="doc-anchor" href="#return-value">§</a>Return value</h2>
|
||||
<p>Returns a tuple of bytes copied <code>a</code> to <code>b</code> and bytes copied <code>b</code> to <code>a</code>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
11
tokio/io/fn.copy_bidirectional_with_sizes.html
Normal file
11
tokio/io/fn.copy_bidirectional_with_sizes.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!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="Copies data in both directions between `a` and `b` using buffers of the specified size."><title>copy_bidirectional_with_sizes in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">copy_bidirectional_with_sizes</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/io/util/copy_bidirectional.rs.html#94-111">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn copy_bidirectional_with_sizes<A, B>(
|
||||
a: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut A</a>,
|
||||
b: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut B</a>,
|
||||
a_to_b_buf_size: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>,
|
||||
b_to_a_buf_size: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>,
|
||||
) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>)><div class="where">where
|
||||
A: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> + <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||||
B: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> + <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Copies data in both directions between <code>a</code> and <code>b</code> using buffers of the specified size.</p>
|
||||
<p>This method is the same as the <a href="fn.copy_bidirectional.html" title="fn tokio::io::copy_bidirectional"><code>copy_bidirectional()</code></a>, except that it allows you to set the
|
||||
size of the internal buffers used when copying data.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
28
tokio/io/fn.copy_buf.html
Normal file
28
tokio/io/fn.copy_buf.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<!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="Asynchronously copies the entire contents of a reader into a writer."><title>copy_buf in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">copy_<wbr>buf</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#errors" title="Errors">Errors</a></li><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">copy_buf</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/io/util/copy_buf.rs.html#60-70">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn copy_buf<'a, R, W>(
|
||||
reader: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut R</a>,
|
||||
writer: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut W</a>,
|
||||
) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u64.html">u64</a>><div class="where">where
|
||||
R: <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
||||
W: <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Asynchronously copies the entire contents of a reader into a writer.</p>
|
||||
<p>This function returns a future that will continuously read data from
|
||||
<code>reader</code> and then write it into <code>writer</code> in a streaming fashion until
|
||||
<code>reader</code> returns EOF or fails.</p>
|
||||
<p>On success, the total number of bytes that were copied from <code>reader</code> to
|
||||
<code>writer</code> is returned.</p>
|
||||
<p>This is a <a href="fn.copy.html" title="fn tokio::io::copy"><code>tokio::io::copy</code></a> alternative for <a href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead"><code>AsyncBufRead</code></a> readers
|
||||
with no extra buffer allocation, since <a href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead"><code>AsyncBufRead</code></a> allow access
|
||||
to the reader’s inner buffer.</p>
|
||||
<h2 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h2>
|
||||
<p>The returned future will finish with an error will return an error
|
||||
immediately if any call to <code>poll_fill_buf</code> or <code>poll_write</code> returns an
|
||||
error.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>reader: <span class="kw-2">&</span>[u8] = <span class="string">b"hello"</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>writer: Vec<u8> = <span class="macro">vec!</span>[];
|
||||
|
||||
io::copy_buf(<span class="kw-2">&mut </span>reader, <span class="kw-2">&mut </span>writer).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="string">b"hello"</span>, <span class="kw-2">&</span>writer[..]);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
4
tokio/io/fn.duplex.html
Normal file
4
tokio/io/fn.duplex.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<!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="Create a new pair of `DuplexStream`s that act like a pair of connected sockets."><title>duplex in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">duplex</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/io/util/mem.rs.html#104-118">Source</a> </span></div><pre class="rust item-decl"><code>pub fn duplex(max_buf_size: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>) -> (<a class="struct" href="struct.DuplexStream.html" title="struct tokio::io::DuplexStream">DuplexStream</a>, <a class="struct" href="struct.DuplexStream.html" title="struct tokio::io::DuplexStream">DuplexStream</a>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a new pair of <code>DuplexStream</code>s that act like a pair of connected sockets.</p>
|
||||
<p>The <code>max_buf_size</code> argument is the maximum amount of bytes that can be
|
||||
written to a side before the write returns <code>Poll::Pending</code>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
27
tokio/io/fn.empty.html
Normal file
27
tokio/io/fn.empty.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<!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="Creates a value that is always at EOF for reads, and ignores all data written."><title>empty in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">empty</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">empty</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/io/util/empty.rs.html#62-64">Source</a> </span></div><pre class="rust item-decl"><code>pub fn empty() -> <a class="struct" href="struct.Empty.html" title="struct tokio::io::Empty">Empty</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a value that is always at EOF for reads, and ignores all data written.</p>
|
||||
<p>All writes on the returned instance will return <code>Poll::Ready(Ok(buf.len()))</code>
|
||||
and the contents of the buffer will not be inspected.</p>
|
||||
<p>All reads from the returned instance will return <code>Poll::Ready(Ok(0))</code>.</p>
|
||||
<p>This is an asynchronous version of <a href="https://doc.rust-lang.org/1.84.1/std/io/util/fn.empty.html" title="fn std::io::util::empty"><code>std::io::empty</code></a>.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>A slightly sad example of not reading anything into a buffer:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncReadExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buffer = String::new();
|
||||
io::empty().read_to_string(<span class="kw-2">&mut </span>buffer).<span class="kw">await</span>.unwrap();
|
||||
<span class="macro">assert!</span>(buffer.is_empty());
|
||||
}</code></pre></div>
|
||||
<p>A convoluted way of getting the length of a buffer:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() {
|
||||
<span class="kw">let </span>buffer = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>];
|
||||
<span class="kw">let </span>num_bytes = io::empty().write(<span class="kw-2">&</span>buffer).<span class="kw">await</span>.unwrap();
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">5</span>);
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
5
tokio/io/fn.join.html
Normal file
5
tokio/io/fn.join.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<!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="Join two values implementing `AsyncRead` and `AsyncWrite` into a single handle."><title>join in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">join</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/io/join.rs.html#11-17">Source</a> </span></div><pre class="rust item-decl"><code>pub fn join<R, W>(reader: R, writer: W) -> <a class="struct" href="struct.Join.html" title="struct tokio::io::Join">Join</a><R, W><div class="where">where
|
||||
R: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a>,
|
||||
W: <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Join two values implementing <code>AsyncRead</code> and <code>AsyncWrite</code> into a
|
||||
single handle.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
14
tokio/io/fn.repeat.html
Normal file
14
tokio/io/fn.repeat.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<!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="Creates an instance of an async reader that infinitely repeats one byte."><title>repeat in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">repeat</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">repeat</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/io/util/repeat.rs.html#45-47">Source</a> </span></div><pre class="rust item-decl"><code>pub fn repeat(byte: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>) -> <a class="struct" href="struct.Repeat.html" title="struct tokio::io::Repeat">Repeat</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an instance of an async reader that infinitely repeats one byte.</p>
|
||||
<p>All reads from this reader will succeed by filling the specified buffer with
|
||||
the given byte.</p>
|
||||
<p>This is an asynchronous version of <a href="https://doc.rust-lang.org/1.84.1/std/io/util/fn.repeat.html" title="fn std::io::util::repeat"><code>std::io::repeat</code></a>.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncReadExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buffer = [<span class="number">0</span>; <span class="number">3</span>];
|
||||
io::repeat(<span class="number">0b101</span>).read_exact(<span class="kw-2">&mut </span>buffer).<span class="kw">await</span>.unwrap();
|
||||
<span class="macro">assert_eq!</span>(buffer, [<span class="number">0b101</span>, <span class="number">0b101</span>, <span class="number">0b101</span>]);
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
19
tokio/io/fn.simplex.html
Normal file
19
tokio/io/fn.simplex.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<!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="Creates unidirectional buffer that acts like in memory pipe."><title>simplex in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">simplex</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#unify-reader-and-writer" title="Unify reader and writer">Unify reader and writer</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">simplex</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/io/util/mem.rs.html#211-213">Source</a> </span></div><pre class="rust item-decl"><code>pub fn simplex(
|
||||
max_buf_size: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>,
|
||||
) -> (<a class="struct" href="struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a><<a class="struct" href="struct.SimplexStream.html" title="struct tokio::io::SimplexStream">SimplexStream</a>>, <a class="struct" href="struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a><<a class="struct" href="struct.SimplexStream.html" title="struct tokio::io::SimplexStream">SimplexStream</a>>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates unidirectional buffer that acts like in memory pipe.</p>
|
||||
<p>The <code>max_buf_size</code> argument is the maximum amount of bytes that can be
|
||||
written to a buffer before the it returns <code>Poll::Pending</code>.</p>
|
||||
<h2 id="unify-reader-and-writer"><a class="doc-anchor" href="#unify-reader-and-writer">§</a>Unify reader and writer</h2>
|
||||
<p>The reader and writer half can be unified into a single structure
|
||||
of <code>SimplexStream</code> that supports both reading and writing or
|
||||
the <code>SimplexStream</code> can be already created as unified structure
|
||||
using <a href="struct.SimplexStream.html#method.new_unsplit" title="associated function tokio::io::SimplexStream::new_unsplit"><code>SimplexStream::new_unsplit()</code></a>.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>(writer, reader) = tokio::io::simplex(<span class="number">64</span>);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>simplex_stream = writer.unsplit(reader);
|
||||
simplex_stream.write_all(<span class="string">b"hello"</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buf = [<span class="number">0u8</span>; <span class="number">5</span>];
|
||||
simplex_stream.read_exact(<span class="kw-2">&mut </span>buf).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>buf, <span class="string">b"hello"</span>);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
17
tokio/io/fn.sink.html
Normal file
17
tokio/io/fn.sink.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!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="Creates an instance of an async writer which will successfully consume all data."><title>sink in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">sink</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">sink</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/io/util/sink.rs.html#48-50">Source</a> </span></div><pre class="rust item-decl"><code>pub fn sink() -> <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates an instance of an async writer which will successfully consume all
|
||||
data.</p>
|
||||
<p>All calls to <a href="trait.AsyncWrite.html#tymethod.poll_write" title="method tokio::io::AsyncWrite::poll_write"><code>poll_write</code></a> on the returned instance will return
|
||||
<code>Poll::Ready(Ok(buf.len()))</code> and the contents of the buffer will not be
|
||||
inspected.</p>
|
||||
<p>This is an asynchronous version of <a href="https://doc.rust-lang.org/1.84.1/std/io/util/fn.sink.html" title="fn std::io::util::sink"><code>std::io::sink</code></a>.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() -> io::Result<()> {
|
||||
<span class="kw">let </span>buffer = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>];
|
||||
<span class="kw">let </span>num_bytes = io::sink().write(<span class="kw-2">&</span>buffer).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">5</span>);
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
6
tokio/io/fn.split.html
Normal file
6
tokio/io/fn.split.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<!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="Splits a single value implementing `AsyncRead + AsyncWrite` into separate `AsyncRead` and `AsyncWrite` handles."><title>split in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">split</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/io/split.rs.html#32-50">Source</a> </span></div><pre class="rust item-decl"><code>pub fn split<T>(stream: T) -> (<a class="struct" href="struct.ReadHalf.html" title="struct tokio::io::ReadHalf">ReadHalf</a><T>, <a class="struct" href="struct.WriteHalf.html" title="struct tokio::io::WriteHalf">WriteHalf</a><T>)<div class="where">where
|
||||
T: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> + <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Splits a single value implementing <code>AsyncRead + AsyncWrite</code> into separate
|
||||
<code>AsyncRead</code> and <code>AsyncWrite</code> handles.</p>
|
||||
<p>To restore this read/write object from its <code>ReadHalf</code> and
|
||||
<code>WriteHalf</code> use <a href="struct.ReadHalf.html#method.unsplit" title="method tokio::io::ReadHalf::unsplit"><code>unsplit</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
18
tokio/io/fn.stderr.html
Normal file
18
tokio/io/fn.stderr.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!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="Constructs a new handle to the standard error of the current process."><title>stderr in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">stderr</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">stderr</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/io/stderr.rs.html#68-73">Source</a> </span></div><pre class="rust item-decl"><code>pub fn stderr() -> <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Constructs a new handle to the standard error of the current process.</p>
|
||||
<p>The returned handle allows writing to standard error from the within the
|
||||
Tokio runtime.</p>
|
||||
<p>Concurrent writes to stderr must be executed with care: Only individual
|
||||
writes to this <a href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite"><code>AsyncWrite</code></a> are guaranteed to be intact. In particular
|
||||
you should be aware that writes using <a href="trait.AsyncWriteExt.html#method.write_all" title="method tokio::io::AsyncWriteExt::write_all"><code>write_all</code></a> are not guaranteed
|
||||
to occur as a single write, so multiple threads writing data with
|
||||
<a href="trait.AsyncWriteExt.html#method.write_all" title="method tokio::io::AsyncWriteExt::write_all"><code>write_all</code></a> may result in interleaved output.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() -> io::Result<()> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>stderr = io::stderr();
|
||||
stderr.write_all(<span class="string">b"Print some error here."</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
9
tokio/io/fn.stdin.html
Normal file
9
tokio/io/fn.stdin.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<!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="Constructs a new handle to the standard input of the current process."><title>stdin in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">stdin</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/io/stdin.rs.html#43-48">Source</a> </span></div><pre class="rust item-decl"><code>pub fn stdin() -> <a class="struct" href="struct.Stdin.html" title="struct tokio::io::Stdin">Stdin</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Constructs a new handle to the standard input of the current process.</p>
|
||||
<p>This handle is best used for non-interactive uses, such as when a file
|
||||
is piped into the application. For technical reasons, <code>stdin</code> is
|
||||
implemented by using an ordinary blocking read on a separate thread, and
|
||||
it is impossible to cancel that read. This can make shutdown of the
|
||||
runtime hang until the user presses enter.</p>
|
||||
<p>For interactive uses, it is recommended to spawn a thread dedicated to
|
||||
user input and use blocking IO directly in that thread.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
40
tokio/io/fn.stdout.html
Normal file
40
tokio/io/fn.stdout.html
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<!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="Constructs a new handle to the standard output of the current process."><title>stdout in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">stdout</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Function <span class="fn">stdout</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/io/stdout.rs.html#117-122">Source</a> </span></div><pre class="rust item-decl"><code>pub fn stdout() -> <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Constructs a new handle to the standard output of the current process.</p>
|
||||
<p>The returned handle allows writing to standard out from the within the
|
||||
Tokio runtime.</p>
|
||||
<p>Concurrent writes to stdout must be executed with care: Only individual
|
||||
writes to this <a href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite"><code>AsyncWrite</code></a> are guaranteed to be intact. In particular
|
||||
you should be aware that writes using <a href="trait.AsyncWriteExt.html#method.write_all" title="method tokio::io::AsyncWriteExt::write_all"><code>write_all</code></a> are not guaranteed
|
||||
to occur as a single write, so multiple threads writing data with
|
||||
<a href="trait.AsyncWriteExt.html#method.write_all" title="method tokio::io::AsyncWriteExt::write_all"><code>write_all</code></a> may result in interleaved output.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() -> io::Result<()> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>stdout = io::stdout();
|
||||
stdout.write_all(<span class="string">b"Hello world!"</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
<p>The following is an example of using <code>stdio</code> with loop.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() {
|
||||
<span class="kw">let </span>messages = <span class="macro">vec!</span>[<span class="string">"hello"</span>, <span class="string">" world\n"</span>];
|
||||
|
||||
<span class="comment">// When you use `stdio` in a loop, it is recommended to create
|
||||
// a single `stdio` instance outside the loop and call a write
|
||||
// operation against that instance on each loop.
|
||||
//
|
||||
// Repeatedly creating `stdout` instances inside the loop and
|
||||
// writing to that handle could result in mangled output since
|
||||
// each write operation is handled by a different blocking thread.
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>stdout = io::stdout();
|
||||
|
||||
<span class="kw">for </span>message <span class="kw">in </span><span class="kw-2">&</span>messages {
|
||||
stdout.write_all(message.as_bytes()).<span class="kw">await</span>.unwrap();
|
||||
stdout.flush().<span class="kw">await</span>.unwrap();
|
||||
}
|
||||
}</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
128
tokio/io/index.html
Normal file
128
tokio/io/index.html
Normal file
File diff suppressed because one or more lines are too long
11
tokio/io/interest/struct.Interest.html
Normal file
11
tokio/io/interest/struct.Interest.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.Interest.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.Interest.html">../../../tokio/io/struct.Interest.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.Interest.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/join/fn.join.html
Normal file
11
tokio/io/join/fn.join.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/fn.join.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/fn.join.html">../../../tokio/io/fn.join.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/fn.join.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/join/struct.Join.html
Normal file
11
tokio/io/join/struct.Join.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.Join.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.Join.html">../../../tokio/io/struct.Join.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.Join.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/read_buf/struct.ReadBuf.html
Normal file
11
tokio/io/read_buf/struct.ReadBuf.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.ReadBuf.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.ReadBuf.html">../../../tokio/io/struct.ReadBuf.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.ReadBuf.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/ready/struct.Ready.html
Normal file
11
tokio/io/ready/struct.Ready.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.Ready.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.Ready.html">../../../tokio/io/struct.Ready.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.Ready.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
1
tokio/io/sidebar-items.js
Normal file
1
tokio/io/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["copy","copy_bidirectional","copy_bidirectional_with_sizes","copy_buf","duplex","empty","join","repeat","simplex","sink","split","stderr","stdin","stdout"],"mod":["unix"],"struct":["BufReader","BufStream","BufWriter","DuplexStream","Empty","Interest","Join","Lines","ReadBuf","ReadHalf","Ready","Repeat","SimplexStream","Sink","Split","Stderr","Stdin","Stdout","Take","WriteHalf"],"trait":["AsyncBufRead","AsyncBufReadExt","AsyncRead","AsyncReadExt","AsyncSeek","AsyncSeekExt","AsyncWrite","AsyncWriteExt"]};
|
||||
11
tokio/io/split/fn.split.html
Normal file
11
tokio/io/split/fn.split.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/fn.split.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/fn.split.html">../../../tokio/io/fn.split.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/fn.split.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/split/struct.ReadHalf.html
Normal file
11
tokio/io/split/struct.ReadHalf.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.ReadHalf.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.ReadHalf.html">../../../tokio/io/struct.ReadHalf.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.ReadHalf.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/split/struct.WriteHalf.html
Normal file
11
tokio/io/split/struct.WriteHalf.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.WriteHalf.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.WriteHalf.html">../../../tokio/io/struct.WriteHalf.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.WriteHalf.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/stderr/fn.stderr.html
Normal file
11
tokio/io/stderr/fn.stderr.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/fn.stderr.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/fn.stderr.html">../../../tokio/io/fn.stderr.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/fn.stderr.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/stderr/struct.Stderr.html
Normal file
11
tokio/io/stderr/struct.Stderr.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.Stderr.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.Stderr.html">../../../tokio/io/struct.Stderr.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.Stderr.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/stdin/fn.stdin.html
Normal file
11
tokio/io/stdin/fn.stdin.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/fn.stdin.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/fn.stdin.html">../../../tokio/io/fn.stdin.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/fn.stdin.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/stdin/struct.Stdin.html
Normal file
11
tokio/io/stdin/struct.Stdin.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.Stdin.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.Stdin.html">../../../tokio/io/struct.Stdin.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.Stdin.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/stdout/fn.stdout.html
Normal file
11
tokio/io/stdout/fn.stdout.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/fn.stdout.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/fn.stdout.html">../../../tokio/io/fn.stdout.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/fn.stdout.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/stdout/struct.Stdout.html
Normal file
11
tokio/io/stdout/struct.Stdout.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../tokio/io/struct.Stdout.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../tokio/io/struct.Stdout.html">../../../tokio/io/struct.Stdout.html</a>...</p>
|
||||
<script>location.replace("../../../tokio/io/struct.Stdout.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
221
tokio/io/struct.BufReader.html
Normal file
221
tokio/io/struct.BufReader.html
Normal file
File diff suppressed because one or more lines are too long
219
tokio/io/struct.BufStream.html
Normal file
219
tokio/io/struct.BufStream.html
Normal file
File diff suppressed because one or more lines are too long
208
tokio/io/struct.BufWriter.html
Normal file
208
tokio/io/struct.BufWriter.html
Normal file
File diff suppressed because one or more lines are too long
169
tokio/io/struct.DuplexStream.html
Normal file
169
tokio/io/struct.DuplexStream.html
Normal file
File diff suppressed because one or more lines are too long
187
tokio/io/struct.Empty.html
Normal file
187
tokio/io/struct.Empty.html
Normal file
File diff suppressed because one or more lines are too long
87
tokio/io/struct.Interest.html
Normal file
87
tokio/io/struct.Interest.html
Normal file
File diff suppressed because one or more lines are too long
199
tokio/io/struct.Join.html
Normal file
199
tokio/io/struct.Join.html
Normal file
File diff suppressed because one or more lines are too long
54
tokio/io/struct.Lines.html
Normal file
54
tokio/io/struct.Lines.html
Normal file
File diff suppressed because one or more lines are too long
95
tokio/io/struct.ReadBuf.html
Normal file
95
tokio/io/struct.ReadBuf.html
Normal file
File diff suppressed because one or more lines are too long
82
tokio/io/struct.ReadHalf.html
Normal file
82
tokio/io/struct.ReadHalf.html
Normal file
File diff suppressed because one or more lines are too long
80
tokio/io/struct.Ready.html
Normal file
80
tokio/io/struct.Ready.html
Normal file
File diff suppressed because one or more lines are too long
78
tokio/io/struct.Repeat.html
Normal file
78
tokio/io/struct.Repeat.html
Normal file
File diff suppressed because one or more lines are too long
162
tokio/io/struct.SimplexStream.html
Normal file
162
tokio/io/struct.SimplexStream.html
Normal file
File diff suppressed because one or more lines are too long
94
tokio/io/struct.Sink.html
Normal file
94
tokio/io/struct.Sink.html
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<!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="An async writer which will move data into the void."><title>Sink in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Sink</a></h2><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsyncWrite-for-Sink" title="AsyncWrite">AsyncWrite</a></li><li><a href="#impl-Debug-for-Sink" 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-Freeze-for-Sink" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Sink" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Sink" title="Send">Send</a></li><li><a href="#impl-Sync-for-Sink" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Sink" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Sink" title="UnwindSafe">UnwindSafe</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-AsyncWriteExt-for-W" title="AsyncWriteExt">AsyncWriteExt</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>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Struct <span class="struct">Sink</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/io/util/sink.rs.html#19-21">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Sink { <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>An async writer which will move data into the void.</p>
|
||||
<p>This struct is generally created by calling <a href="fn.sink.html" title="fn tokio::io::sink"><code>sink</code></a>. Please
|
||||
see the documentation of <code>sink()</code> for more details.</p>
|
||||
<p>This is an asynchronous version of <a href="https://doc.rust-lang.org/1.84.1/std/io/util/struct.Sink.html" title="struct std::io::util::Sink"><code>std::io::Sink</code></a>.</p>
|
||||
</div></details><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-AsyncWrite-for-Sink" class="impl"><a class="src rightside" href="../../src/tokio/io/util/sink.rs.html#53-78">Source</a><a href="#impl-AsyncWrite-for-Sink" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> for <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.poll_write" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/sink.rs.html#55-63">Source</a><a href="#method.poll_write" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_write" class="fn">poll_write</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
buf: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Attempt to write bytes from <code>buf</code> into the object. <a href="trait.AsyncWrite.html#tymethod.poll_write">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_flush" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/sink.rs.html#66-70">Source</a><a href="#method.poll_flush" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_flush" class="fn">poll_flush</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Attempts to flush the object, ensuring that any buffered data reach
|
||||
their destination. <a href="trait.AsyncWrite.html#tymethod.poll_flush">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_shutdown" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/sink.rs.html#73-77">Source</a><a href="#method.poll_shutdown" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_shutdown" class="fn">poll_shutdown</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Initiates or attempts to shut down this writer, returning success when
|
||||
the I/O connection has completely shut down. <a href="trait.AsyncWrite.html#tymethod.poll_shutdown">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_write.rs.html#158-168">Source</a><a href="#method.poll_write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#method.poll_write_vectored" class="fn">poll_write_vectored</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
bufs: &[<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'_>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Like <a href="trait.AsyncWrite.html#tymethod.poll_write" title="method tokio::io::AsyncWrite::poll_write"><code>poll_write</code></a>, except that it writes from a slice of buffers. <a href="trait.AsyncWrite.html#method.poll_write_vectored">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_write.rs.html#180-182">Source</a><a href="#method.is_write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#method.is_write_vectored" class="fn">is_write_vectored</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Determines if this writer has an efficient <a href="trait.AsyncWrite.html#method.poll_write_vectored" title="method tokio::io::AsyncWrite::poll_write_vectored"><code>poll_write_vectored</code></a>
|
||||
implementation. <a href="trait.AsyncWrite.html#method.is_write_vectored">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Sink" class="impl"><a class="src rightside" href="../../src/tokio/io/util/sink.rs.html#80-84">Source</a><a href="#impl-Debug-for-Sink" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</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/io/util/sink.rs.html#81-83">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.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-Sink" class="impl"><a href="#impl-Freeze-for-Sink" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</a></h3></section><section id="impl-RefUnwindSafe-for-Sink" class="impl"><a href="#impl-RefUnwindSafe-for-Sink" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</a></h3></section><section id="impl-Send-for-Sink" class="impl"><a href="#impl-Send-for-Sink" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</a></h3></section><section id="impl-Sync-for-Sink" class="impl"><a href="#impl-Sync-for-Sink" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</a></h3></section><section id="impl-Unpin-for-Sink" class="impl"><a href="#impl-Unpin-for-Sink" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</a></h3></section><section id="impl-UnwindSafe-for-Sink" class="impl"><a href="#impl-UnwindSafe-for-Sink" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Sink.html" title="struct tokio::io::Sink">Sink</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.84.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.84.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.84.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.84.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.84.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.84.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.84.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-AsyncWriteExt-for-W" class="impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1298">Source</a><a href="#impl-AsyncWriteExt-for-W" class="anchor">§</a><h3 class="code-header">impl<W> <a class="trait" href="trait.AsyncWriteExt.html" title="trait tokio::io::AsyncWriteExt">AsyncWriteExt</a> for W<div class="where">where
|
||||
W: <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.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.write" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#124-129">Source</a><a href="#method.write" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write" class="fn">write</a><'a>(&'a mut self, src: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> Write<'a, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a buffer into this writer, returning how many bytes were
|
||||
written. <a href="trait.AsyncWriteExt.html#method.write">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#173-178">Source</a><a href="#method.write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_vectored" class="fn">write_vectored</a><'a, 'b>(
|
||||
&'a mut self,
|
||||
bufs: &'a [<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'b>],
|
||||
) -> WriteVectored<'a, 'b, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Like <a href="trait.AsyncWriteExt.html#method.write" title="method tokio::io::AsyncWriteExt::write"><code>write</code></a>, except that it writes from a slice of buffers. <a href="trait.AsyncWriteExt.html#method.write_vectored">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_buf" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#254-260">Source</a><a href="#method.write_buf" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_buf" class="fn">write_buf</a><'a, B>(&'a mut self, src: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut B</a>) -> WriteBuf<'a, Self, B><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||||
B: <a class="trait" href="../../bytes/buf/buf_impl/trait.Buf.html" title="trait bytes::buf::buf_impl::Buf">Buf</a>,</div></h4></section></summary><div class='docblock'>Writes a buffer into this writer, advancing the buffer’s internal
|
||||
cursor. <a href="trait.AsyncWriteExt.html#method.write_buf">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all_buf" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#319-325">Source</a><a href="#method.write_all_buf" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_all_buf" class="fn">write_all_buf</a><'a, B>(
|
||||
&'a mut self,
|
||||
src: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut B</a>,
|
||||
) -> WriteAllBuf<'a, Self, B><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||||
B: <a class="trait" href="../../bytes/buf/buf_impl/trait.Buf.html" title="trait bytes::buf::buf_impl::Buf">Buf</a>,</div></h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a href="trait.AsyncWriteExt.html#method.write_all_buf">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#369-374">Source</a><a href="#method.write_all" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_all" class="fn">write_all</a><'a>(&'a mut self, src: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> WriteAll<'a, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a href="trait.AsyncWriteExt.html#method.write_all">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u8" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u8" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u8" class="fn">write_u8</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>) -> WriteU8<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 8-bit integer to the underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u8">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i8" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i8" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i8" class="fn">write_i8</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i8.html">i8</a>) -> WriteI8<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 8-bit integer to the underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i8">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u16" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u16" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u16" class="fn">write_u16</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u16.html">u16</a>) -> WriteU16<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 16-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u16">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i16" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i16" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i16" class="fn">write_i16</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i16.html">i16</a>) -> WriteI16<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 16-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i16">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u32" class="fn">write_u32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -> WriteU32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 32-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i32" class="fn">write_i32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i32.html">i32</a>) -> WriteI32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 32-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u64" class="fn">write_u64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>) -> WriteU64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 64-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i64" class="fn">write_i64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i64.html">i64</a>) -> WriteI64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 64-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u128" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u128" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u128" class="fn">write_u128</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u128.html">u128</a>) -> WriteU128<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 128-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u128">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i128" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i128" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i128" class="fn">write_i128</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i128.html">i128</a>) -> WriteI128<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 128-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i128">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f32" class="fn">write_f32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f32.html">f32</a>) -> WriteF32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 32-bit floating point type in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f64" class="fn">write_f64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f64.html">f64</a>) -> WriteF64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 64-bit floating point type in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u16_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u16_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u16_le" class="fn">write_u16_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u16.html">u16</a>) -> WriteU16Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 16-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u16_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i16_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i16_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i16_le" class="fn">write_i16_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i16.html">i16</a>) -> WriteI16Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 16-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i16_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u32_le" class="fn">write_u32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -> WriteU32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 32-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i32_le" class="fn">write_i32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i32.html">i32</a>) -> WriteI32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 32-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u64_le" class="fn">write_u64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>) -> WriteU64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 64-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i64_le" class="fn">write_i64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i64.html">i64</a>) -> WriteI64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 64-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u128_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u128_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u128_le" class="fn">write_u128_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u128.html">u128</a>) -> WriteU128Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 128-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u128_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i128_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i128_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i128_le" class="fn">write_i128_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i128.html">i128</a>) -> WriteI128Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 128-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i128_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f32_le" class="fn">write_f32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f32.html">f32</a>) -> WriteF32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 32-bit floating point type in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f64_le" class="fn">write_f64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f64.html">f64</a>) -> WriteF64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 64-bit floating point type in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flush" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1250-1255">Source</a><a href="#method.flush" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.flush" class="fn">flush</a>(&mut self) -> Flush<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Flushes this output stream, ensuring that all intermediately buffered
|
||||
contents reach their destination. <a href="trait.AsyncWriteExt.html#method.flush">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.shutdown" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1289-1294">Source</a><a href="#method.shutdown" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.shutdown" class="fn">shutdown</a>(&mut self) -> Shutdown<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Shuts down the output stream, ensuring that the value can be dropped
|
||||
cleanly. <a href="trait.AsyncWriteExt.html#method.shutdown">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.84.1/src/core/borrow.rs.html#209">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.84.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.84.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.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#217">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.84.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.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/src/core/convert/mod.rs.html#765">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.84.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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#748-750">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/convert/mod.rs.html#805-807">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#790-792">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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>
|
||||
48
tokio/io/struct.Split.html
Normal file
48
tokio/io/struct.Split.html
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<!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="Splitter for the `split` method."><title>Split in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Split</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.next_segment" title="next_segment">next_segment</a></li><li><a href="#method.poll_next_segment" title="poll_next_segment">poll_next_segment</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-Split%3CR%3E" title="Debug">Debug</a></li><li><a href="#impl-Unpin-for-Split%3CR%3E" title="Unpin">Unpin</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Split%3CR%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Split%3CR%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Split%3CR%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-Split%3CR%3E" title="Sync">Sync</a></li><li><a href="#impl-UnwindSafe-for-Split%3CR%3E" title="UnwindSafe">UnwindSafe</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>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Struct <span class="struct">Split</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/io/util/split.rs.html#10-26">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Split<R> { <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>Splitter for the <a href="trait.AsyncBufReadExt.html#method.split" title="method tokio::io::AsyncBufReadExt::split"><code>split</code></a> method.</p>
|
||||
<p>A <code>Split</code> can be turned into a <code>Stream</code> with <a href="https://docs.rs/tokio-stream/0.1/tokio_stream/wrappers/struct.SplitStream.html"><code>SplitStream</code></a>.</p>
|
||||
</div></details><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-Split%3CR%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/util/split.rs.html#40-66">Source</a><a href="#impl-Split%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R> <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R><div class="where">where
|
||||
R: <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.next_segment" class="method"><a class="src rightside" href="../../src/tokio/io/util/split.rs.html#61-65">Source</a><h4 class="code-header">pub async fn <a href="#method.next_segment" class="fn">next_segment</a>(&mut self) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>>>></h4></section></summary><div class="docblock"><p>Returns the next segment in the stream.</p>
|
||||
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::AsyncBufReadExt;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>segments = my_buf_read.split(<span class="string">b'f'</span>);
|
||||
|
||||
<span class="kw">while let </span><span class="prelude-val">Some</span>(segment) = segments.next_segment().<span class="kw">await</span><span class="question-mark">? </span>{
|
||||
<span class="macro">println!</span>(<span class="string">"length = {}"</span>, segment.len())
|
||||
}</code></pre></div>
|
||||
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Split%3CR%3E-1" class="impl"><a class="src rightside" href="../../src/tokio/io/util/split.rs.html#68-111">Source</a><a href="#impl-Split%3CR%3E-1" class="anchor">§</a><h3 class="code-header">impl<R> <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R><div class="where">where
|
||||
R: <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.poll_next_segment" class="method"><a class="src rightside" href="../../src/tokio/io/util/split.rs.html#89-110">Source</a><h4 class="code-header">pub fn <a href="#method.poll_next_segment" class="fn">poll_next_segment</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>>>>></h4></section></summary><div class="docblock"><p>Polls for the next segment in the stream.</p>
|
||||
<p>This method returns:</p>
|
||||
<ul>
|
||||
<li><code>Poll::Pending</code> if the next segment is not yet available.</li>
|
||||
<li><code>Poll::Ready(Ok(Some(segment)))</code> if the next segment is available.</li>
|
||||
<li><code>Poll::Ready(Ok(None))</code> if there are no more segments in this stream.</li>
|
||||
<li><code>Poll::Ready(Err(err))</code> if an IO error occurred while reading the
|
||||
next segment.</li>
|
||||
</ul>
|
||||
<p>When the method returns <code>Poll::Pending</code>, the <code>Waker</code> in the provided
|
||||
<code>Context</code> is scheduled to receive a wakeup when more bytes become
|
||||
available on the underlying IO resource.</p>
|
||||
<p>Note that on multiple calls to <code>poll_next_segment</code>, only the <code>Waker</code>
|
||||
from the <code>Context</code> passed to the most recent call is scheduled to
|
||||
receive a wakeup.</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-Split%3CR%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/util/split.rs.html#16">Source</a><a href="#impl-Debug-for-Split%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R></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/io/util/split.rs.html#16">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><section id="impl-Unpin-for-Split%3CR%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/util/split.rs.html#10-26">Source</a><a href="#impl-Unpin-for-Split%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<'__pin, R> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R><div class="where">where
|
||||
PinnedFieldsOf<__Origin<'__pin, R>>: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section></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-Split%3CR%3E" class="impl"><a href="#impl-Freeze-for-Split%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R><div class="where">where
|
||||
R: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a>,</div></h3></section><section id="impl-RefUnwindSafe-for-Split%3CR%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Split%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R><div class="where">where
|
||||
R: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</div></h3></section><section id="impl-Send-for-Split%3CR%3E" class="impl"><a href="#impl-Send-for-Split%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R><div class="where">where
|
||||
R: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section><section id="impl-Sync-for-Split%3CR%3E" class="impl"><a href="#impl-Sync-for-Split%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R><div class="where">where
|
||||
R: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section><section id="impl-UnwindSafe-for-Split%3CR%3E" class="impl"><a href="#impl-UnwindSafe-for-Split%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R> <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><R><div class="where">where
|
||||
R: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</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.84.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.84.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.84.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.84.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.84.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.84.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.84.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.84.1/src/core/borrow.rs.html#209">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.84.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.84.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.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#217">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.84.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.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/src/core/convert/mod.rs.html#765">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.84.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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#748-750">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/convert/mod.rs.html#805-807">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#790-792">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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>
|
||||
106
tokio/io/struct.Stderr.html
Normal file
106
tokio/io/struct.Stderr.html
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
<!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="A handle to the standard error stream of a process."><title>Stderr in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Stderr</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsFd-for-Stderr" title="AsFd">AsFd</a></li><li><a href="#impl-AsRawFd-for-Stderr" title="AsRawFd">AsRawFd</a></li><li><a href="#impl-AsyncWrite-for-Stderr" title="AsyncWrite">AsyncWrite</a></li><li><a href="#impl-Debug-for-Stderr" 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-Freeze-for-Stderr" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Stderr" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Stderr" title="Send">Send</a></li><li><a href="#impl-Sync-for-Stderr" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Stderr" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Stderr" title="UnwindSafe">UnwindSafe</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-AsyncWriteExt-for-W" title="AsyncWriteExt">AsyncWriteExt</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>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Struct <span class="struct">Stderr</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/io/stderr.rs.html#38-40">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Stderr { <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>A handle to the standard error stream of a process.</p>
|
||||
<p>Concurrent writes to stderr must be executed with care: Only individual
|
||||
writes to this <a href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite"><code>AsyncWrite</code></a> are guaranteed to be intact. In particular
|
||||
you should be aware that writes using <a href="trait.AsyncWriteExt.html#method.write_all" title="method tokio::io::AsyncWriteExt::write_all"><code>write_all</code></a> are not guaranteed
|
||||
to occur as a single write, so multiple threads writing data with
|
||||
<a href="trait.AsyncWriteExt.html#method.write_all" title="method tokio::io::AsyncWriteExt::write_all"><code>write_all</code></a> may result in interleaved output.</p>
|
||||
<p>Created by the <a href="fn.stderr.html" title="fn tokio::io::stderr"><code>stderr</code></a> function.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() -> io::Result<()> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>stderr = io::stdout();
|
||||
stderr.write_all(<span class="string">b"Print some error here."</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
</div></details><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-AsFd-for-Stderr" class="impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#88-92">Source</a><a href="#impl-AsFd-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/std/os/fd/owned/trait.AsFd.html" title="trait std::os::fd::owned::AsFd">AsFd</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_fd" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#89-91">Source</a><a href="#method.as_fd" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/std/os/fd/owned/trait.AsFd.html#tymethod.as_fd" class="fn">as_fd</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/os/fd/owned/struct.BorrowedFd.html" title="struct std::os::fd::owned::BorrowedFd">BorrowedFd</a><'_></h4></section></summary><div class='docblock'>Borrows the file descriptor. <a href="https://doc.rust-lang.org/1.84.1/std/os/fd/owned/trait.AsFd.html#tymethod.as_fd">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRawFd-for-Stderr" class="impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#82-86">Source</a><a href="#impl-AsRawFd-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/std/os/fd/raw/trait.AsRawFd.html" title="trait std::os::fd::raw::AsRawFd">AsRawFd</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_raw_fd" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#83-85">Source</a><a href="#method.as_raw_fd" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/std/os/fd/raw/trait.AsRawFd.html#tymethod.as_raw_fd" class="fn">as_raw_fd</a>(&self) -> <a class="type" href="https://doc.rust-lang.org/1.84.1/std/os/fd/raw/type.RawFd.html" title="type std::os::fd::raw::RawFd">RawFd</a></h4></section></summary><div class='docblock'>Extracts the raw file descriptor. <a href="https://doc.rust-lang.org/1.84.1/std/os/fd/raw/trait.AsRawFd.html#tymethod.as_raw_fd">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsyncWrite-for-Stderr" class="impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#111-130">Source</a><a href="#impl-AsyncWrite-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.poll_write" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#112-118">Source</a><a href="#method.poll_write" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_write" class="fn">poll_write</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
buf: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.usize.html">usize</a>>></h4></section></summary><div class='docblock'>Attempt to write bytes from <code>buf</code> into the object. <a href="trait.AsyncWrite.html#tymethod.poll_write">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_flush" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#120-122">Source</a><a href="#method.poll_flush" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_flush" class="fn">poll_flush</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Attempts to flush the object, ensuring that any buffered data reach
|
||||
their destination. <a href="trait.AsyncWrite.html#tymethod.poll_flush">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_shutdown" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#124-129">Source</a><a href="#method.poll_shutdown" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_shutdown" class="fn">poll_shutdown</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Initiates or attempts to shut down this writer, returning success when
|
||||
the I/O connection has completely shut down. <a href="trait.AsyncWrite.html#tymethod.poll_shutdown">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_write.rs.html#158-168">Source</a><a href="#method.poll_write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#method.poll_write_vectored" class="fn">poll_write_vectored</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
bufs: &[<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'_>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Like <a href="trait.AsyncWrite.html#tymethod.poll_write" title="method tokio::io::AsyncWrite::poll_write"><code>poll_write</code></a>, except that it writes from a slice of buffers. <a href="trait.AsyncWrite.html#method.poll_write_vectored">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_write.rs.html#180-182">Source</a><a href="#method.is_write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#method.is_write_vectored" class="fn">is_write_vectored</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Determines if this writer has an efficient <a href="trait.AsyncWrite.html#method.poll_write_vectored" title="method tokio::io::AsyncWrite::poll_write_vectored"><code>poll_write_vectored</code></a>
|
||||
implementation. <a href="trait.AsyncWrite.html#method.is_write_vectored">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Stderr" class="impl"><a class="src rightside" href="../../src/tokio/io/stderr.rs.html#37">Source</a><a href="#impl-Debug-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</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/io/stderr.rs.html#37">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.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-Stderr" class="impl"><a href="#impl-Freeze-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></h3></section><section id="impl-RefUnwindSafe-for-Stderr" class="impl"><a href="#impl-RefUnwindSafe-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></h3></section><section id="impl-Send-for-Stderr" class="impl"><a href="#impl-Send-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></h3></section><section id="impl-Sync-for-Stderr" class="impl"><a href="#impl-Sync-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></h3></section><section id="impl-Unpin-for-Stderr" class="impl"><a href="#impl-Unpin-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</a></h3></section><section id="impl-UnwindSafe-for-Stderr" class="impl"><a href="#impl-UnwindSafe-for-Stderr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Stderr.html" title="struct tokio::io::Stderr">Stderr</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.84.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.84.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.84.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.84.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.84.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.84.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.84.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-AsyncWriteExt-for-W" class="impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1298">Source</a><a href="#impl-AsyncWriteExt-for-W" class="anchor">§</a><h3 class="code-header">impl<W> <a class="trait" href="trait.AsyncWriteExt.html" title="trait tokio::io::AsyncWriteExt">AsyncWriteExt</a> for W<div class="where">where
|
||||
W: <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.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.write" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#124-129">Source</a><a href="#method.write" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write" class="fn">write</a><'a>(&'a mut self, src: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> Write<'a, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a buffer into this writer, returning how many bytes were
|
||||
written. <a href="trait.AsyncWriteExt.html#method.write">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#173-178">Source</a><a href="#method.write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_vectored" class="fn">write_vectored</a><'a, 'b>(
|
||||
&'a mut self,
|
||||
bufs: &'a [<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'b>],
|
||||
) -> WriteVectored<'a, 'b, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Like <a href="trait.AsyncWriteExt.html#method.write" title="method tokio::io::AsyncWriteExt::write"><code>write</code></a>, except that it writes from a slice of buffers. <a href="trait.AsyncWriteExt.html#method.write_vectored">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_buf" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#254-260">Source</a><a href="#method.write_buf" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_buf" class="fn">write_buf</a><'a, B>(&'a mut self, src: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut B</a>) -> WriteBuf<'a, Self, B><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||||
B: <a class="trait" href="../../bytes/buf/buf_impl/trait.Buf.html" title="trait bytes::buf::buf_impl::Buf">Buf</a>,</div></h4></section></summary><div class='docblock'>Writes a buffer into this writer, advancing the buffer’s internal
|
||||
cursor. <a href="trait.AsyncWriteExt.html#method.write_buf">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all_buf" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#319-325">Source</a><a href="#method.write_all_buf" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_all_buf" class="fn">write_all_buf</a><'a, B>(
|
||||
&'a mut self,
|
||||
src: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut B</a>,
|
||||
) -> WriteAllBuf<'a, Self, B><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||||
B: <a class="trait" href="../../bytes/buf/buf_impl/trait.Buf.html" title="trait bytes::buf::buf_impl::Buf">Buf</a>,</div></h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a href="trait.AsyncWriteExt.html#method.write_all_buf">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#369-374">Source</a><a href="#method.write_all" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_all" class="fn">write_all</a><'a>(&'a mut self, src: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> WriteAll<'a, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a href="trait.AsyncWriteExt.html#method.write_all">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u8" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u8" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u8" class="fn">write_u8</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>) -> WriteU8<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 8-bit integer to the underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u8">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i8" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i8" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i8" class="fn">write_i8</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i8.html">i8</a>) -> WriteI8<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 8-bit integer to the underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i8">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u16" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u16" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u16" class="fn">write_u16</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u16.html">u16</a>) -> WriteU16<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 16-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u16">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i16" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i16" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i16" class="fn">write_i16</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i16.html">i16</a>) -> WriteI16<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 16-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i16">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u32" class="fn">write_u32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -> WriteU32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 32-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i32" class="fn">write_i32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i32.html">i32</a>) -> WriteI32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 32-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u64" class="fn">write_u64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>) -> WriteU64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 64-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i64" class="fn">write_i64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i64.html">i64</a>) -> WriteI64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 64-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u128" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u128" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u128" class="fn">write_u128</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u128.html">u128</a>) -> WriteU128<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 128-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u128">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i128" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i128" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i128" class="fn">write_i128</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i128.html">i128</a>) -> WriteI128<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 128-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i128">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f32" class="fn">write_f32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f32.html">f32</a>) -> WriteF32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 32-bit floating point type in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f64" class="fn">write_f64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f64.html">f64</a>) -> WriteF64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 64-bit floating point type in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u16_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u16_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u16_le" class="fn">write_u16_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u16.html">u16</a>) -> WriteU16Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 16-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u16_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i16_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i16_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i16_le" class="fn">write_i16_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i16.html">i16</a>) -> WriteI16Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 16-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i16_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u32_le" class="fn">write_u32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -> WriteU32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 32-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i32_le" class="fn">write_i32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i32.html">i32</a>) -> WriteI32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 32-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u64_le" class="fn">write_u64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>) -> WriteU64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 64-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i64_le" class="fn">write_i64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i64.html">i64</a>) -> WriteI64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 64-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u128_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u128_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u128_le" class="fn">write_u128_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u128.html">u128</a>) -> WriteU128Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 128-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u128_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i128_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i128_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i128_le" class="fn">write_i128_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i128.html">i128</a>) -> WriteI128Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 128-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i128_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f32_le" class="fn">write_f32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f32.html">f32</a>) -> WriteF32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 32-bit floating point type in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f64_le" class="fn">write_f64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f64.html">f64</a>) -> WriteF64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 64-bit floating point type in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flush" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1250-1255">Source</a><a href="#method.flush" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.flush" class="fn">flush</a>(&mut self) -> Flush<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Flushes this output stream, ensuring that all intermediately buffered
|
||||
contents reach their destination. <a href="trait.AsyncWriteExt.html#method.flush">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.shutdown" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1289-1294">Source</a><a href="#method.shutdown" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.shutdown" class="fn">shutdown</a>(&mut self) -> Shutdown<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Shuts down the output stream, ensuring that the value can be dropped
|
||||
cleanly. <a href="trait.AsyncWriteExt.html#method.shutdown">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.84.1/src/core/borrow.rs.html#209">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.84.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.84.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.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#217">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.84.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.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/src/core/convert/mod.rs.html#765">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.84.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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#748-750">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/convert/mod.rs.html#805-807">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#790-792">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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>
|
||||
84
tokio/io/struct.Stdin.html
Normal file
84
tokio/io/struct.Stdin.html
Normal file
File diff suppressed because one or more lines are too long
128
tokio/io/struct.Stdout.html
Normal file
128
tokio/io/struct.Stdout.html
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
<!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="A handle to the standard output stream of a process."><title>Stdout in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Stdout</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsFd-for-Stdout" title="AsFd">AsFd</a></li><li><a href="#impl-AsRawFd-for-Stdout" title="AsRawFd">AsRawFd</a></li><li><a href="#impl-AsyncWrite-for-Stdout" title="AsyncWrite">AsyncWrite</a></li><li><a href="#impl-Debug-for-Stdout" 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-Freeze-for-Stdout" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Stdout" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Stdout" title="Send">Send</a></li><li><a href="#impl-Sync-for-Stdout" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Stdout" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Stdout" title="UnwindSafe">UnwindSafe</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-AsyncWriteExt-for-W" title="AsyncWriteExt">AsyncWriteExt</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>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Struct <span class="struct">Stdout</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/io/stdout.rs.html#62-64">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Stdout { <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>A handle to the standard output stream of a process.</p>
|
||||
<p>Concurrent writes to stdout must be executed with care: Only individual
|
||||
writes to this <a href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite"><code>AsyncWrite</code></a> are guaranteed to be intact. In particular
|
||||
you should be aware that writes using <a href="trait.AsyncWriteExt.html#method.write_all" title="method tokio::io::AsyncWriteExt::write_all"><code>write_all</code></a> are not guaranteed
|
||||
to occur as a single write, so multiple threads writing data with
|
||||
<a href="trait.AsyncWriteExt.html#method.write_all" title="method tokio::io::AsyncWriteExt::write_all"><code>write_all</code></a> may result in interleaved output.</p>
|
||||
<p>Created by the <a href="fn.stdout.html" title="fn tokio::io::stdout"><code>stdout</code></a> function.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() -> io::Result<()> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>stdout = io::stdout();
|
||||
stdout.write_all(<span class="string">b"Hello world!"</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
<p>The following is an example of using <code>stdio</code> with loop.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::{<span class="self">self</span>, AsyncWriteExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() {
|
||||
<span class="kw">let </span>messages = <span class="macro">vec!</span>[<span class="string">"hello"</span>, <span class="string">" world\n"</span>];
|
||||
|
||||
<span class="comment">// When you use `stdio` in a loop, it is recommended to create
|
||||
// a single `stdio` instance outside the loop and call a write
|
||||
// operation against that instance on each loop.
|
||||
//
|
||||
// Repeatedly creating `stdout` instances inside the loop and
|
||||
// writing to that handle could result in mangled output since
|
||||
// each write operation is handled by a different blocking thread.
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>stdout = io::stdout();
|
||||
|
||||
<span class="kw">for </span>message <span class="kw">in </span><span class="kw-2">&</span>messages {
|
||||
stdout.write_all(message.as_bytes()).<span class="kw">await</span>.unwrap();
|
||||
stdout.flush().<span class="kw">await</span>.unwrap();
|
||||
}
|
||||
}</code></pre></div>
|
||||
</div></details><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-AsFd-for-Stdout" class="impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#137-141">Source</a><a href="#impl-AsFd-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/std/os/fd/owned/trait.AsFd.html" title="trait std::os::fd::owned::AsFd">AsFd</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_fd" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#138-140">Source</a><a href="#method.as_fd" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/std/os/fd/owned/trait.AsFd.html#tymethod.as_fd" class="fn">as_fd</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/os/fd/owned/struct.BorrowedFd.html" title="struct std::os::fd::owned::BorrowedFd">BorrowedFd</a><'_></h4></section></summary><div class='docblock'>Borrows the file descriptor. <a href="https://doc.rust-lang.org/1.84.1/std/os/fd/owned/trait.AsFd.html#tymethod.as_fd">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRawFd-for-Stdout" class="impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#131-135">Source</a><a href="#impl-AsRawFd-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/std/os/fd/raw/trait.AsRawFd.html" title="trait std::os::fd::raw::AsRawFd">AsRawFd</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_raw_fd" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#132-134">Source</a><a href="#method.as_raw_fd" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/std/os/fd/raw/trait.AsRawFd.html#tymethod.as_raw_fd" class="fn">as_raw_fd</a>(&self) -> <a class="type" href="https://doc.rust-lang.org/1.84.1/std/os/fd/raw/type.RawFd.html" title="type std::os::fd::raw::RawFd">RawFd</a></h4></section></summary><div class='docblock'>Extracts the raw file descriptor. <a href="https://doc.rust-lang.org/1.84.1/std/os/fd/raw/trait.AsRawFd.html#tymethod.as_raw_fd">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsyncWrite-for-Stdout" class="impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#160-179">Source</a><a href="#impl-AsyncWrite-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.poll_write" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#161-167">Source</a><a href="#method.poll_write" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_write" class="fn">poll_write</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
buf: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.usize.html">usize</a>>></h4></section></summary><div class='docblock'>Attempt to write bytes from <code>buf</code> into the object. <a href="trait.AsyncWrite.html#tymethod.poll_write">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_flush" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#169-171">Source</a><a href="#method.poll_flush" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_flush" class="fn">poll_flush</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Attempts to flush the object, ensuring that any buffered data reach
|
||||
their destination. <a href="trait.AsyncWrite.html#tymethod.poll_flush">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_shutdown" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#173-178">Source</a><a href="#method.poll_shutdown" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#tymethod.poll_shutdown" class="fn">poll_shutdown</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Initiates or attempts to shut down this writer, returning success when
|
||||
the I/O connection has completely shut down. <a href="trait.AsyncWrite.html#tymethod.poll_shutdown">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.poll_write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_write.rs.html#158-168">Source</a><a href="#method.poll_write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#method.poll_write_vectored" class="fn">poll_write_vectored</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
bufs: &[<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'_>],
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Like <a href="trait.AsyncWrite.html#tymethod.poll_write" title="method tokio::io::AsyncWrite::poll_write"><code>poll_write</code></a>, except that it writes from a slice of buffers. <a href="trait.AsyncWrite.html#method.poll_write_vectored">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_write.rs.html#180-182">Source</a><a href="#method.is_write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWrite.html#method.is_write_vectored" class="fn">is_write_vectored</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Determines if this writer has an efficient <a href="trait.AsyncWrite.html#method.poll_write_vectored" title="method tokio::io::AsyncWrite::poll_write_vectored"><code>poll_write_vectored</code></a>
|
||||
implementation. <a href="trait.AsyncWrite.html#method.is_write_vectored">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Stdout" class="impl"><a class="src rightside" href="../../src/tokio/io/stdout.rs.html#61">Source</a><a href="#impl-Debug-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</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/io/stdout.rs.html#61">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.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-Stdout" class="impl"><a href="#impl-Freeze-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></h3></section><section id="impl-RefUnwindSafe-for-Stdout" class="impl"><a href="#impl-RefUnwindSafe-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></h3></section><section id="impl-Send-for-Stdout" class="impl"><a href="#impl-Send-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></h3></section><section id="impl-Sync-for-Stdout" class="impl"><a href="#impl-Sync-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></h3></section><section id="impl-Unpin-for-Stdout" class="impl"><a href="#impl-Unpin-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</a></h3></section><section id="impl-UnwindSafe-for-Stdout" class="impl"><a href="#impl-UnwindSafe-for-Stdout" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Stdout.html" title="struct tokio::io::Stdout">Stdout</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.84.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.84.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.84.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.84.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.84.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.84.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.84.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-AsyncWriteExt-for-W" class="impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1298">Source</a><a href="#impl-AsyncWriteExt-for-W" class="anchor">§</a><h3 class="code-header">impl<W> <a class="trait" href="trait.AsyncWriteExt.html" title="trait tokio::io::AsyncWriteExt">AsyncWriteExt</a> for W<div class="where">where
|
||||
W: <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.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.write" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#124-129">Source</a><a href="#method.write" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write" class="fn">write</a><'a>(&'a mut self, src: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> Write<'a, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a buffer into this writer, returning how many bytes were
|
||||
written. <a href="trait.AsyncWriteExt.html#method.write">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_vectored" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#173-178">Source</a><a href="#method.write_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_vectored" class="fn">write_vectored</a><'a, 'b>(
|
||||
&'a mut self,
|
||||
bufs: &'a [<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/struct.IoSlice.html" title="struct std::io::IoSlice">IoSlice</a><'b>],
|
||||
) -> WriteVectored<'a, 'b, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Like <a href="trait.AsyncWriteExt.html#method.write" title="method tokio::io::AsyncWriteExt::write"><code>write</code></a>, except that it writes from a slice of buffers. <a href="trait.AsyncWriteExt.html#method.write_vectored">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_buf" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#254-260">Source</a><a href="#method.write_buf" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_buf" class="fn">write_buf</a><'a, B>(&'a mut self, src: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut B</a>) -> WriteBuf<'a, Self, B><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||||
B: <a class="trait" href="../../bytes/buf/buf_impl/trait.Buf.html" title="trait bytes::buf::buf_impl::Buf">Buf</a>,</div></h4></section></summary><div class='docblock'>Writes a buffer into this writer, advancing the buffer’s internal
|
||||
cursor. <a href="trait.AsyncWriteExt.html#method.write_buf">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all_buf" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#319-325">Source</a><a href="#method.write_all_buf" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_all_buf" class="fn">write_all_buf</a><'a, B>(
|
||||
&'a mut self,
|
||||
src: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&'a mut B</a>,
|
||||
) -> WriteAllBuf<'a, Self, B><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||||
B: <a class="trait" href="../../bytes/buf/buf_impl/trait.Buf.html" title="trait bytes::buf::buf_impl::Buf">Buf</a>,</div></h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a href="trait.AsyncWriteExt.html#method.write_all_buf">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_all" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#369-374">Source</a><a href="#method.write_all" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_all" class="fn">write_all</a><'a>(&'a mut self, src: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) -> WriteAll<'a, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Attempts to write an entire buffer into this writer. <a href="trait.AsyncWriteExt.html#method.write_all">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u8" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u8" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u8" class="fn">write_u8</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>) -> WriteU8<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 8-bit integer to the underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u8">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i8" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i8" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i8" class="fn">write_i8</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i8.html">i8</a>) -> WriteI8<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 8-bit integer to the underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i8">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u16" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u16" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u16" class="fn">write_u16</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u16.html">u16</a>) -> WriteU16<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 16-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u16">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i16" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i16" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i16" class="fn">write_i16</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i16.html">i16</a>) -> WriteI16<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 16-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i16">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u32" class="fn">write_u32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -> WriteU32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 32-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i32" class="fn">write_i32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i32.html">i32</a>) -> WriteI32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 32-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u64" class="fn">write_u64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>) -> WriteU64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 64-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i64" class="fn">write_i64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i64.html">i64</a>) -> WriteI64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 64-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u128" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u128" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u128" class="fn">write_u128</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u128.html">u128</a>) -> WriteU128<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 128-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u128">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i128" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i128" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i128" class="fn">write_i128</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i128.html">i128</a>) -> WriteI128<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 128-bit integer in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i128">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f32" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f32" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f32" class="fn">write_f32</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f32.html">f32</a>) -> WriteF32<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 32-bit floating point type in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f32">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f64" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f64" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f64" class="fn">write_f64</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f64.html">f64</a>) -> WriteF64<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 64-bit floating point type in big-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f64">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u16_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u16_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u16_le" class="fn">write_u16_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u16.html">u16</a>) -> WriteU16Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 16-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u16_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i16_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i16_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i16_le" class="fn">write_i16_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i16.html">i16</a>) -> WriteI16Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 16-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i16_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u32_le" class="fn">write_u32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -> WriteU32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 32-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i32_le" class="fn">write_i32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i32.html">i32</a>) -> WriteI32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes a signed 32-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u64_le" class="fn">write_u64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>) -> WriteU64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 64-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i64_le" class="fn">write_i64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i64.html">i64</a>) -> WriteI64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 64-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_u128_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_u128_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_u128_le" class="fn">write_u128_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u128.html">u128</a>) -> WriteU128Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an unsigned 128-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_u128_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_i128_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_i128_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_i128_le" class="fn">write_i128_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i128.html">i128</a>) -> WriteI128Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an signed 128-bit integer in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_i128_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f32_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f32_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f32_le" class="fn">write_f32_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f32.html">f32</a>) -> WriteF32Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 32-bit floating point type in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f32_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.write_f64_le" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#376-1218">Source</a><a href="#method.write_f64_le" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.write_f64_le" class="fn">write_f64_le</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f64.html">f64</a>) -> WriteF64Le<&mut Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Writes an 64-bit floating point type in little-endian order to the
|
||||
underlying writer. <a href="trait.AsyncWriteExt.html#method.write_f64_le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.flush" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1250-1255">Source</a><a href="#method.flush" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.flush" class="fn">flush</a>(&mut self) -> Flush<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Flushes this output stream, ensuring that all intermediately buffered
|
||||
contents reach their destination. <a href="trait.AsyncWriteExt.html#method.flush">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.shutdown" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/util/async_write_ext.rs.html#1289-1294">Source</a><a href="#method.shutdown" class="anchor">§</a><h4 class="code-header">fn <a href="trait.AsyncWriteExt.html#method.shutdown" class="fn">shutdown</a>(&mut self) -> Shutdown<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class='docblock'>Shuts down the output stream, ensuring that the value can be dropped
|
||||
cleanly. <a href="trait.AsyncWriteExt.html#method.shutdown">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.84.1/src/core/borrow.rs.html#209">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.84.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.84.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.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#217">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.84.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.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/src/core/convert/mod.rs.html#765">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.84.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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#748-750">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/convert/mod.rs.html#805-807">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#790-792">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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>
|
||||
120
tokio/io/struct.Take.html
Normal file
120
tokio/io/struct.Take.html
Normal file
File diff suppressed because one or more lines are too long
93
tokio/io/struct.WriteHalf.html
Normal file
93
tokio/io/struct.WriteHalf.html
Normal file
File diff suppressed because one or more lines are too long
61
tokio/io/trait.AsyncBufRead.html
Normal file
61
tokio/io/trait.AsyncBufRead.html
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<!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="Reads bytes asynchronously."><title>AsyncBufRead in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Async<wbr>BufRead</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.consume" title="consume">consume</a></li><li><a href="#tymethod.poll_fill_buf" title="poll_fill_buf">poll_fill_buf</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-AsyncBufRead-for-%26%5Bu8%5D" title="&[u8]">&[u8]</a></li><li><a href="#impl-AsyncBufRead-for-%26mut+T" title="&mut T">&mut T</a></li><li><a href="#impl-AsyncBufRead-for-Box%3CT%3E" title="Box<T>">Box<T></a></li><li><a href="#impl-AsyncBufRead-for-Cursor%3CT%3E" title="Cursor<T>">Cursor<T></a></li><li><a href="#impl-AsyncBufRead-for-Pin%3CP%3E" title="Pin<P>">Pin<P></a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Trait <span class="trait">AsyncBufRead</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/io/async_buf_read.rs.html#23-63">Source</a> </span></div><pre class="rust item-decl"><code>pub trait AsyncBufRead: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> {
|
||||
// Required methods
|
||||
fn <a href="#tymethod.poll_fill_buf" class="fn">poll_fill_buf</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u8.html">u8</a>]>>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.consume" class="fn">consume</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>);
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Reads bytes asynchronously.</p>
|
||||
<p>This trait is analogous to <a href="https://doc.rust-lang.org/1.84.1/std/io/trait.BufRead.html" title="trait std::io::BufRead"><code>std::io::BufRead</code></a>, but integrates with
|
||||
the asynchronous task system. In particular, the <a href="trait.AsyncBufRead.html#tymethod.poll_fill_buf" title="method tokio::io::AsyncBufRead::poll_fill_buf"><code>poll_fill_buf</code></a> method,
|
||||
unlike <a href="https://doc.rust-lang.org/1.84.1/std/io/trait.BufRead.html#tymethod.fill_buf" title="method std::io::BufRead::fill_buf"><code>BufRead::fill_buf</code></a>, will automatically queue the current task for wakeup
|
||||
and return if data is not yet available, rather than blocking the calling
|
||||
thread.</p>
|
||||
<p>Utilities for working with <code>AsyncBufRead</code> values are provided by
|
||||
<a href="trait.AsyncBufReadExt.html" title="trait tokio::io::AsyncBufReadExt"><code>AsyncBufReadExt</code></a>.</p>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.poll_fill_buf" class="method"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#45">Source</a><h4 class="code-header">fn <a href="#tymethod.poll_fill_buf" class="fn">poll_fill_buf</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u8.html">u8</a>]>></h4></section></summary><div class="docblock"><p>Attempts to return the contents of the internal buffer, filling it with more data
|
||||
from the inner reader if it is empty.</p>
|
||||
<p>On success, returns <code>Poll::Ready(Ok(buf))</code>.</p>
|
||||
<p>If no data is available for reading, the method returns
|
||||
<code>Poll::Pending</code> and arranges for the current task (via
|
||||
<code>cx.waker().wake_by_ref()</code>) to receive a notification when the object becomes
|
||||
readable or is closed.</p>
|
||||
<p>This function is a lower-level call. It needs to be paired with the
|
||||
<a href="trait.AsyncBufRead.html#tymethod.consume" title="method tokio::io::AsyncBufRead::consume"><code>consume</code></a> method to function properly. When calling this
|
||||
method, none of the contents will be “read” in the sense that later
|
||||
calling <a href="trait.AsyncRead.html#tymethod.poll_read" title="method tokio::io::AsyncRead::poll_read"><code>poll_read</code></a> may return the same contents. As such, <a href="trait.AsyncBufRead.html#tymethod.consume" title="method tokio::io::AsyncBufRead::consume"><code>consume</code></a> must
|
||||
be called with the number of bytes that are consumed from this buffer to
|
||||
ensure that the bytes are never returned twice.</p>
|
||||
<p>An empty buffer returned indicates that the stream has reached EOF.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.consume" class="method"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#62">Source</a><h4 class="code-header">fn <a href="#tymethod.consume" class="fn">consume</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Tells this buffer that <code>amt</code> bytes have been consumed from the buffer,
|
||||
so they should no longer be returned in calls to <a href="trait.AsyncRead.html#tymethod.poll_read" title="method tokio::io::AsyncRead::poll_read"><code>poll_read</code></a>.</p>
|
||||
<p>This function is a lower-level call. It needs to be paired with the
|
||||
<a href="trait.AsyncBufRead.html#tymethod.poll_fill_buf" title="method tokio::io::AsyncBufRead::poll_fill_buf"><code>poll_fill_buf</code></a> method to function properly. This function does
|
||||
not perform any I/O, it simply informs this object that some amount of
|
||||
its buffer, returned from <a href="trait.AsyncBufRead.html#tymethod.poll_fill_buf" title="method tokio::io::AsyncBufRead::poll_fill_buf"><code>poll_fill_buf</code></a>, has been consumed and should
|
||||
no longer be returned. As such, this function may do odd things if
|
||||
<a href="trait.AsyncBufRead.html#tymethod.poll_fill_buf" title="method tokio::io::AsyncBufRead::poll_fill_buf"><code>poll_fill_buf</code></a> isn’t called before calling it.</p>
|
||||
<p>The <code>amt</code> must be <code><=</code> the number of bytes in the buffer returned by
|
||||
<a href="trait.AsyncBufRead.html#tymethod.poll_fill_buf" title="method tokio::io::AsyncBufRead::poll_fill_buf"><code>poll_fill_buf</code></a>.</p>
|
||||
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-AsyncBufRead-for-%26%5Bu8%5D" class="impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#99-107">Source</a><a href="#impl-AsyncBufRead-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><section id="method.poll_fill_buf" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#100-102">Source</a><a href="#method.poll_fill_buf" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_fill_buf" class="fn">poll_fill_buf</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
_cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u8.html">u8</a>]>></h4></section><section id="method.consume" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#104-106">Source</a><a href="#method.consume" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.consume" class="fn">consume</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncBufRead-for-Pin%3CP%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#85-97">Source</a><a href="#impl-AsyncBufRead-for-Pin%3CP%3E" class="anchor">§</a><h3 class="code-header">impl<P> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><P><div class="where">where
|
||||
P: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
||||
P::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a>: <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a>,</div></h3></section></summary><div class="impl-items"><section id="method.poll_fill_buf-1" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#90-92">Source</a><a href="#method.poll_fill_buf-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_fill_buf" class="fn">poll_fill_buf</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u8.html">u8</a>]>></h4></section><section id="method.consume-1" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#94-96">Source</a><a href="#method.consume-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.consume" class="fn">consume</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncBufRead-for-Cursor%3CT%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#109-117">Source</a><a href="#impl-AsyncBufRead-for-Cursor%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor">Cursor</a><T></h3></section></summary><div class="impl-items"><section id="method.poll_fill_buf-2" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#110-112">Source</a><a href="#method.poll_fill_buf-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_fill_buf" class="fn">poll_fill_buf</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
_cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u8.html">u8</a>]>></h4></section><section id="method.consume-2" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#114-116">Source</a><a href="#method.consume-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.consume" class="fn">consume</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncBufRead-for-%26mut+T" class="impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#81-83">Source</a><a href="#impl-AsyncBufRead-for-%26mut+T" class="anchor">§</a><h3 class="code-header">impl<T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&mut T</a></h3></section></summary><div class="impl-items"><section id="method.poll_fill_buf-3" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#82">Source</a><a href="#method.poll_fill_buf-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_fill_buf" class="fn">poll_fill_buf</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u8.html">u8</a>]>></h4></section><section id="method.consume-3" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#82">Source</a><a href="#method.consume-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.consume" class="fn">consume</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AsyncBufRead-for-Box%3CT%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#77-79">Source</a><a href="#impl-AsyncBufRead-for-Box%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T></h3></section></summary><div class="impl-items"><section id="method.poll_fill_buf-4" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#78">Source</a><a href="#method.poll_fill_buf-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_fill_buf" class="fn">poll_fill_buf</a>(
|
||||
self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>,
|
||||
cx: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="type" href="https://doc.rust-lang.org/1.84.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.84.1/std/primitive.u8.html">u8</a>]>></h4></section><section id="method.consume-4" class="method trait-impl"><a class="src rightside" href="../../src/tokio/io/async_buf_read.rs.html#78">Source</a><a href="#method.consume-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.consume" class="fn">consume</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut Self>, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>)</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-AsyncBufRead-for-Empty" class="impl"><a class="src rightside" href="../../src/tokio/io/util/empty.rs.html#80-90">Source</a><a href="#impl-AsyncBufRead-for-Empty" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="struct.Empty.html" title="struct tokio::io::Empty">Empty</a></h3></section><section id="impl-AsyncBufRead-for-Join%3CR,+W%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/join.rs.html#119-130">Source</a><a href="#impl-AsyncBufRead-for-Join%3CR,+W%3E" class="anchor">§</a><h3 class="code-header">impl<R, W> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="struct.Join.html" title="struct tokio::io::Join">Join</a><R, W><div class="where">where
|
||||
R: <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a>,</div></h3></section><section id="impl-AsyncBufRead-for-Take%3CR%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/util/take.rs.html#107-128">Source</a><a href="#impl-AsyncBufRead-for-Take%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R: <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a>> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="struct.Take.html" title="struct tokio::io::Take">Take</a><R></h3></section><section id="impl-AsyncBufRead-for-BufReader%3CR%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/util/buf_reader.rs.html#122-144">Source</a><a href="#impl-AsyncBufRead-for-BufReader%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a>> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="struct.BufReader.html" title="struct tokio::io::BufReader">BufReader</a><R></h3></section><section id="impl-AsyncBufRead-for-BufStream%3CRW%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/util/buf_stream.rs.html#189-197">Source</a><a href="#impl-AsyncBufRead-for-BufStream%3CRW%3E" class="anchor">§</a><h3 class="code-header">impl<RW: <a class="trait" href="trait.AsyncRead.html" title="trait tokio::io::AsyncRead">AsyncRead</a> + <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a>> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="struct.BufStream.html" title="struct tokio::io::BufStream">BufStream</a><RW></h3></section><section id="impl-AsyncBufRead-for-BufWriter%3CW%3E" class="impl"><a class="src rightside" href="../../src/tokio/io/util/buf_writer.rs.html#279-287">Source</a><a href="#impl-AsyncBufRead-for-BufWriter%3CW%3E" class="anchor">§</a><h3 class="code-header">impl<W: <a class="trait" href="trait.AsyncWrite.html" title="trait tokio::io::AsyncWrite">AsyncWrite</a> + <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a>> <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> for <a class="struct" href="struct.BufWriter.html" title="struct tokio::io::BufWriter">BufWriter</a><W></h3></section></div><script src="../../trait.impl/tokio/io/async_buf_read/trait.AsyncBufRead.js" data-ignore-extern-crates="alloc,core,std" async></script></section></div></main></body></html>
|
||||
239
tokio/io/trait.AsyncBufReadExt.html
Normal file
239
tokio/io/trait.AsyncBufReadExt.html
Normal file
|
|
@ -0,0 +1,239 @@
|
|||
<!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="An extension trait which adds utility methods to `AsyncBufRead` types."><title>AsyncBufReadExt in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Async<wbr>BufRead<wbr>Ext</a></h2><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.consume" title="consume">consume</a></li><li><a href="#method.fill_buf" title="fill_buf">fill_buf</a></li><li><a href="#method.lines" title="lines">lines</a></li><li><a href="#method.read_line" title="read_line">read_line</a></li><li><a href="#method.read_until" title="read_until">read_until</a></li><li><a href="#method.split" title="split">split</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Trait <span class="trait">AsyncBufReadExt</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/io/util/async_buf_read_ext.rs.html#12-354">Source</a> </span></div><pre class="rust item-decl"><code>pub trait AsyncBufReadExt: <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> {
|
||||
// Provided methods
|
||||
fn <a href="#method.read_until" class="fn">read_until</a><'a>(
|
||||
&'a mut self,
|
||||
byte: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>,
|
||||
buf: &'a mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>>,
|
||||
) -> ReadUntil<'a, Self>
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.read_line" class="fn">read_line</a><'a>(&'a mut self, buf: &'a mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> ReadLine<'a, Self>
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.split" class="fn">split</a>(self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>) -> <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><Self>
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.fill_buf" class="fn">fill_buf</a>(&mut self) -> FillBuf<'_, Self>
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.consume" class="fn">consume</a>(&mut self, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>)
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.lines" class="fn">lines</a>(self) -> <a class="struct" href="struct.Lines.html" title="struct tokio::io::Lines">Lines</a><Self>
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An extension trait which adds utility methods to <a href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead"><code>AsyncBufRead</code></a> types.</p>
|
||||
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.read_until" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_buf_read_ext.rs.html#96-101">Source</a><h4 class="code-header">fn <a href="#method.read_until" class="fn">read_until</a><'a>(
|
||||
&'a mut self,
|
||||
byte: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>,
|
||||
buf: &'a mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>>,
|
||||
) -> ReadUntil<'a, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Reads all bytes into <code>buf</code> until the delimiter <code>byte</code> or EOF is reached.</p>
|
||||
<p>Equivalent to:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">async fn </span>read_until(<span class="kw-2">&mut </span><span class="self">self</span>, byte: u8, buf: <span class="kw-2">&mut </span>Vec<u8>) -> io::Result<usize>;</code></pre></div>
|
||||
<p>This function will read bytes from the underlying stream until the
|
||||
delimiter or EOF is found. Once found, all bytes up to, and including,
|
||||
the delimiter (if found) will be appended to <code>buf</code>.</p>
|
||||
<p>If successful, this function will return the total number of bytes read.</p>
|
||||
<p>If this function returns <code>Ok(0)</code>, the stream has reached EOF.</p>
|
||||
<h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5>
|
||||
<p>This function will ignore all instances of <a href="https://doc.rust-lang.org/1.84.1/std/io/error/enum.ErrorKind.html#variant.Interrupted" title="variant std::io::error::ErrorKind::Interrupted"><code>ErrorKind::Interrupted</code></a> and
|
||||
will otherwise return any errors returned by <a href="trait.AsyncBufRead.html#tymethod.poll_fill_buf" title="method tokio::io::AsyncBufRead::poll_fill_buf"><code>fill_buf</code></a>.</p>
|
||||
<p>If an I/O error is encountered then all bytes read so far will be
|
||||
present in <code>buf</code> and its length will have been adjusted appropriately.</p>
|
||||
<h5 id="cancel-safety"><a class="doc-anchor" href="#cancel-safety">§</a>Cancel safety</h5>
|
||||
<p>If the method is used as the event in a
|
||||
<a href="../macro.select.html" title="macro tokio::select"><code>tokio::select!</code></a> statement and some other branch
|
||||
completes first, then some data may have been partially read. Any
|
||||
partially read bytes are appended to <code>buf</code>, and the method can be
|
||||
called again to continue reading until <code>byte</code>.</p>
|
||||
<p>This method returns the total number of bytes read. If you cancel
|
||||
the call to <code>read_until</code> and then call it again to continue reading,
|
||||
the counter is reset.</p>
|
||||
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
|
||||
<p><a href="https://doc.rust-lang.org/1.84.1/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor"><code>std::io::Cursor</code></a> is a type that implements <code>BufRead</code>. In
|
||||
this example, we use <a href="https://doc.rust-lang.org/1.84.1/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor"><code>Cursor</code></a> to read all the bytes in a byte slice
|
||||
in hyphen delimited segments:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::AsyncBufReadExt;
|
||||
|
||||
<span class="kw">use </span>std::io::Cursor;
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>cursor = Cursor::new(<span class="string">b"lorem-ipsum"</span>);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[];
|
||||
|
||||
<span class="comment">// cursor is at 'l'
|
||||
</span><span class="kw">let </span>num_bytes = cursor.read_until(<span class="string">b'-'</span>, <span class="kw-2">&mut </span>buf)
|
||||
.<span class="kw">await
|
||||
</span>.expect(<span class="string">"reading from cursor won't fail"</span>);
|
||||
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">6</span>);
|
||||
<span class="macro">assert_eq!</span>(buf, <span class="string">b"lorem-"</span>);
|
||||
buf.clear();
|
||||
|
||||
<span class="comment">// cursor is at 'i'
|
||||
</span><span class="kw">let </span>num_bytes = cursor.read_until(<span class="string">b'-'</span>, <span class="kw-2">&mut </span>buf)
|
||||
.<span class="kw">await
|
||||
</span>.expect(<span class="string">"reading from cursor won't fail"</span>);
|
||||
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">5</span>);
|
||||
<span class="macro">assert_eq!</span>(buf, <span class="string">b"ipsum"</span>);
|
||||
buf.clear();
|
||||
|
||||
<span class="comment">// cursor is at EOF
|
||||
</span><span class="kw">let </span>num_bytes = cursor.read_until(<span class="string">b'-'</span>, <span class="kw-2">&mut </span>buf)
|
||||
.<span class="kw">await
|
||||
</span>.expect(<span class="string">"reading from cursor won't fail"</span>);
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">0</span>);
|
||||
<span class="macro">assert_eq!</span>(buf, <span class="string">b""</span>);
|
||||
}</code></pre></div>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_line" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_buf_read_ext.rs.html#199-204">Source</a><h4 class="code-header">fn <a href="#method.read_line" class="fn">read_line</a><'a>(&'a mut self, buf: &'a mut <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> ReadLine<'a, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Reads all bytes until a newline (the 0xA byte) is reached, and append
|
||||
them to the provided buffer.</p>
|
||||
<p>Equivalent to:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">async fn </span>read_line(<span class="kw-2">&mut </span><span class="self">self</span>, buf: <span class="kw-2">&mut </span>String) -> io::Result<usize>;</code></pre></div>
|
||||
<p>This function will read bytes from the underlying stream until the
|
||||
newline delimiter (the 0xA byte) or EOF is found. Once found, all bytes
|
||||
up to, and including, the delimiter (if found) will be appended to
|
||||
<code>buf</code>.</p>
|
||||
<p>If successful, this function will return the total number of bytes read.</p>
|
||||
<p>If this function returns <code>Ok(0)</code>, the stream has reached EOF.</p>
|
||||
<h5 id="errors-1"><a class="doc-anchor" href="#errors-1">§</a>Errors</h5>
|
||||
<p>This function has the same error semantics as <a href="trait.AsyncBufReadExt.html#method.read_until" title="method tokio::io::AsyncBufReadExt::read_until"><code>read_until</code></a> and will
|
||||
also return an error if the read bytes are not valid UTF-8. If an I/O
|
||||
error is encountered then <code>buf</code> may contain some bytes already read in
|
||||
the event that all data read so far was valid UTF-8.</p>
|
||||
<h5 id="cancel-safety-1"><a class="doc-anchor" href="#cancel-safety-1">§</a>Cancel safety</h5>
|
||||
<p>This method is not cancellation safe. If the method is used as the
|
||||
event in a <a href="../macro.select.html" title="macro tokio::select"><code>tokio::select!</code></a> statement and some
|
||||
other branch completes first, then some data may have been partially
|
||||
read, and this data is lost. There are no guarantees regarding the
|
||||
contents of <code>buf</code> when the call is cancelled. The current
|
||||
implementation replaces <code>buf</code> with the empty string, but this may
|
||||
change in the future.</p>
|
||||
<p>This function does not behave like <a href="trait.AsyncBufReadExt.html#method.read_until" title="method tokio::io::AsyncBufReadExt::read_until"><code>read_until</code></a> because of the
|
||||
requirement that a string contains only valid utf-8. If you need a
|
||||
cancellation safe <code>read_line</code>, there are three options:</p>
|
||||
<ul>
|
||||
<li>Call <a href="trait.AsyncBufReadExt.html#method.read_until" title="method tokio::io::AsyncBufReadExt::read_until"><code>read_until</code></a> with a newline character and manually perform the utf-8 check.</li>
|
||||
<li>The stream returned by <a href="trait.AsyncBufReadExt.html#method.lines"><code>lines</code></a> has a cancellation safe
|
||||
<a href="struct.Lines.html#method.next_line" title="method tokio::io::Lines::next_line"><code>next_line</code></a> method.</li>
|
||||
<li>Use <a href="https://docs.rs/tokio-util/latest/tokio_util/codec/struct.LinesCodec.html"><code>tokio_util::codec::LinesCodec</code></a>.</li>
|
||||
</ul>
|
||||
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
|
||||
<p><a href="https://doc.rust-lang.org/1.84.1/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor"><code>std::io::Cursor</code></a> is a type that implements
|
||||
<code>AsyncBufRead</code>. In this example, we use <a href="https://doc.rust-lang.org/1.84.1/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor"><code>Cursor</code></a> to read all the
|
||||
lines in a byte slice:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::AsyncBufReadExt;
|
||||
|
||||
<span class="kw">use </span>std::io::Cursor;
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>cursor = Cursor::new(<span class="string">b"foo\nbar"</span>);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buf = String::new();
|
||||
|
||||
<span class="comment">// cursor is at 'f'
|
||||
</span><span class="kw">let </span>num_bytes = cursor.read_line(<span class="kw-2">&mut </span>buf)
|
||||
.<span class="kw">await
|
||||
</span>.expect(<span class="string">"reading from cursor won't fail"</span>);
|
||||
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">4</span>);
|
||||
<span class="macro">assert_eq!</span>(buf, <span class="string">"foo\n"</span>);
|
||||
buf.clear();
|
||||
|
||||
<span class="comment">// cursor is at 'b'
|
||||
</span><span class="kw">let </span>num_bytes = cursor.read_line(<span class="kw-2">&mut </span>buf)
|
||||
.<span class="kw">await
|
||||
</span>.expect(<span class="string">"reading from cursor won't fail"</span>);
|
||||
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">3</span>);
|
||||
<span class="macro">assert_eq!</span>(buf, <span class="string">"bar"</span>);
|
||||
buf.clear();
|
||||
|
||||
<span class="comment">// cursor is at EOF
|
||||
</span><span class="kw">let </span>num_bytes = cursor.read_line(<span class="kw-2">&mut </span>buf)
|
||||
.<span class="kw">await
|
||||
</span>.expect(<span class="string">"reading from cursor won't fail"</span>);
|
||||
|
||||
<span class="macro">assert_eq!</span>(num_bytes, <span class="number">0</span>);
|
||||
<span class="macro">assert_eq!</span>(buf, <span class="string">""</span>);
|
||||
}</code></pre></div>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.split" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_buf_read_ext.rs.html#240-245">Source</a><h4 class="code-header">fn <a href="#method.split" class="fn">split</a>(self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>) -> <a class="struct" href="struct.Split.html" title="struct tokio::io::Split">Split</a><Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Returns a stream of the contents of this reader split on the byte
|
||||
<code>byte</code>.</p>
|
||||
<p>This method is the asynchronous equivalent to
|
||||
<a href="https://doc.rust-lang.org/1.84.1/std/io/trait.BufRead.html#method.split" title="method std::io::BufRead::split"><code>BufRead::split</code></a>.</p>
|
||||
<p>The stream returned from this function will yield instances of
|
||||
<a href="https://doc.rust-lang.org/1.84.1/std/io/error/type.Result.html" title="type std::io::error::Result"><code>io::Result</code></a><code><</code><a href="https://doc.rust-lang.org/1.84.1/core/option/enum.Option.html" title="enum core::option::Option"><code>Option</code></a><code><</code><a href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec"><code>Vec<u8></code></a><code>>></code>. Each vector returned will <em>not</em> have
|
||||
the delimiter byte at the end.</p>
|
||||
<h5 id="errors-2"><a class="doc-anchor" href="#errors-2">§</a>Errors</h5>
|
||||
<p>Each item of the stream has the same error semantics as
|
||||
<a href="trait.AsyncBufReadExt.html#method.read_until" title="method tokio::io::AsyncBufReadExt::read_until"><code>AsyncBufReadExt::read_until</code></a>.</p>
|
||||
<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::AsyncBufReadExt;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>segments = my_buf_read.split(<span class="string">b'f'</span>);
|
||||
|
||||
<span class="kw">while let </span><span class="prelude-val">Some</span>(segment) = segments.next_segment().<span class="kw">await</span><span class="question-mark">? </span>{
|
||||
<span class="macro">println!</span>(<span class="string">"length = {}"</span>, segment.len())
|
||||
}</code></pre></div>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.fill_buf" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_buf_read_ext.rs.html#277-282">Source</a><h4 class="code-header">fn <a href="#method.fill_buf" class="fn">fill_buf</a>(&mut self) -> FillBuf<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Returns the contents of the internal buffer, filling it with more
|
||||
data from the inner reader if it is empty.</p>
|
||||
<p>This function is a lower-level call. It needs to be paired with the
|
||||
<a href="trait.AsyncBufReadExt.html#method.consume" title="method tokio::io::AsyncBufReadExt::consume"><code>consume</code></a> method to function properly. When calling this method,
|
||||
none of the contents will be “read” in the sense that later calling
|
||||
<code>read</code> may return the same contents. As such, <a href="trait.AsyncBufReadExt.html#method.consume" title="method tokio::io::AsyncBufReadExt::consume"><code>consume</code></a> must be
|
||||
called with the number of bytes that are consumed from this buffer
|
||||
to ensure that the bytes are never returned twice.</p>
|
||||
<p>An empty buffer returned indicates that the stream has reached EOF.</p>
|
||||
<p>Equivalent to:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">async fn </span>fill_buf(<span class="kw-2">&mut </span><span class="self">self</span>) -> io::Result<<span class="kw-2">&</span>[u8]>;</code></pre></div>
|
||||
<h5 id="errors-3"><a class="doc-anchor" href="#errors-3">§</a>Errors</h5>
|
||||
<p>This function will return an I/O error if the underlying reader was
|
||||
read, but returned an error.</p>
|
||||
<h5 id="cancel-safety-2"><a class="doc-anchor" href="#cancel-safety-2">§</a>Cancel safety</h5>
|
||||
<p>This method is cancel safe. If you use it as the event in a
|
||||
<a href="../macro.select.html" title="macro tokio::select"><code>tokio::select!</code></a> statement and some other branch
|
||||
completes first, then it is guaranteed that no data was read.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.consume" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_buf_read_ext.rs.html#299-304">Source</a><h4 class="code-header">fn <a href="#method.consume" class="fn">consume</a>(&mut self, amt: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>)<div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Tells this buffer that <code>amt</code> bytes have been consumed from the
|
||||
buffer, so they should no longer be returned in calls to <a href="trait.AsyncReadExt.html#method.read" title="method tokio::io::AsyncReadExt::read"><code>read</code></a>.</p>
|
||||
<p>This function is a lower-level call. It needs to be paired with the
|
||||
<a href="trait.AsyncBufReadExt.html#method.fill_buf" title="method tokio::io::AsyncBufReadExt::fill_buf"><code>fill_buf</code></a> method to function properly. This function does not
|
||||
perform any I/O, it simply informs this object that some amount of
|
||||
its buffer, returned from <a href="trait.AsyncBufReadExt.html#method.fill_buf" title="method tokio::io::AsyncBufReadExt::fill_buf"><code>fill_buf</code></a>, has been consumed and should
|
||||
no longer be returned. As such, this function may do odd things if
|
||||
<a href="trait.AsyncBufReadExt.html#method.fill_buf" title="method tokio::io::AsyncBufReadExt::fill_buf"><code>fill_buf</code></a> isn’t called before calling it.</p>
|
||||
<p>The <code>amt</code> must be less than the number of bytes in the buffer
|
||||
returned by <a href="trait.AsyncBufReadExt.html#method.fill_buf" title="method tokio::io::AsyncBufReadExt::fill_buf"><code>fill_buf</code></a>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.lines" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_buf_read_ext.rs.html#348-353">Source</a><h4 class="code-header">fn <a href="#method.lines" class="fn">lines</a>(self) -> <a class="struct" href="struct.Lines.html" title="struct tokio::io::Lines">Lines</a><Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Returns a stream over the lines of this reader.
|
||||
This method is the async equivalent to <a href="https://doc.rust-lang.org/1.84.1/std/io/trait.BufRead.html#method.lines" title="method std::io::BufRead::lines"><code>BufRead::lines</code></a>.</p>
|
||||
<p>The stream returned from this function will yield instances of
|
||||
<a href="https://doc.rust-lang.org/1.84.1/std/io/error/type.Result.html" title="type std::io::error::Result"><code>io::Result</code></a><code><</code><a href="https://doc.rust-lang.org/1.84.1/core/option/enum.Option.html" title="enum core::option::Option"><code>Option</code></a><code><</code><a href="https://doc.rust-lang.org/1.84.1/alloc/string/struct.String.html" title="struct alloc::string::String"><code>String</code></a><code>>></code>. Each string returned will <em>not</em> have a newline
|
||||
byte (the 0xA byte) or <code>CRLF</code> (0xD, 0xA bytes) at the end.</p>
|
||||
<h5 id="errors-4"><a class="doc-anchor" href="#errors-4">§</a>Errors</h5>
|
||||
<p>Each line of the stream has the same error semantics as <a href="trait.AsyncBufReadExt.html#method.read_line" title="method tokio::io::AsyncBufReadExt::read_line"><code>AsyncBufReadExt::read_line</code></a>.</p>
|
||||
<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
|
||||
<p><a href="https://doc.rust-lang.org/1.84.1/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor"><code>std::io::Cursor</code></a> is a type that implements <code>BufRead</code>. In
|
||||
this example, we use <a href="https://doc.rust-lang.org/1.84.1/std/io/cursor/struct.Cursor.html" title="struct std::io::cursor::Cursor"><code>Cursor</code></a> to iterate over all the lines in a byte
|
||||
slice.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::io::AsyncBufReadExt;
|
||||
|
||||
<span class="kw">use </span>std::io::Cursor;
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() {
|
||||
<span class="kw">let </span>cursor = Cursor::new(<span class="string">b"lorem\nipsum\r\ndolor"</span>);
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>lines = cursor.lines();
|
||||
|
||||
<span class="macro">assert_eq!</span>(lines.next_line().<span class="kw">await</span>.unwrap(), <span class="prelude-val">Some</span>(String::from(<span class="string">"lorem"</span>)));
|
||||
<span class="macro">assert_eq!</span>(lines.next_line().<span class="kw">await</span>.unwrap(), <span class="prelude-val">Some</span>(String::from(<span class="string">"ipsum"</span>)));
|
||||
<span class="macro">assert_eq!</span>(lines.next_line().<span class="kw">await</span>.unwrap(), <span class="prelude-val">Some</span>(String::from(<span class="string">"dolor"</span>)));
|
||||
<span class="macro">assert_eq!</span>(lines.next_line().<span class="kw">await</span>.unwrap(), <span class="prelude-val">None</span>);
|
||||
}</code></pre></div>
|
||||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-AsyncBufReadExt-for-R" class="impl"><a class="src rightside" href="../../src/tokio/io/util/async_buf_read_ext.rs.html#357">Source</a><a href="#impl-AsyncBufReadExt-for-R" class="anchor">§</a><h3 class="code-header">impl<R: <a class="trait" href="trait.AsyncBufRead.html" title="trait tokio::io::AsyncBufRead">AsyncBufRead</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="trait.AsyncBufReadExt.html" title="trait tokio::io::AsyncBufReadExt">AsyncBufReadExt</a> for R</h3></section></div><script src="../../trait.impl/tokio/io/util/async_buf_read_ext/trait.AsyncBufReadExt.js" async></script></section></div></main></body></html>
|
||||
75
tokio/io/trait.AsyncRead.html
Normal file
75
tokio/io/trait.AsyncRead.html
Normal file
File diff suppressed because one or more lines are too long
987
tokio/io/trait.AsyncReadExt.html
Normal file
987
tokio/io/trait.AsyncReadExt.html
Normal file
File diff suppressed because one or more lines are too long
76
tokio/io/trait.AsyncSeek.html
Normal file
76
tokio/io/trait.AsyncSeek.html
Normal file
File diff suppressed because one or more lines are too long
55
tokio/io/trait.AsyncSeekExt.html
Normal file
55
tokio/io/trait.AsyncSeekExt.html
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<!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="An extension trait that adds utility methods to `AsyncSeek` types."><title>AsyncSeekExt in tokio::io - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Async<wbr>Seek<wbr>Ext</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.rewind" title="rewind">rewind</a></li><li><a href="#method.seek" title="seek">seek</a></li><li><a href="#method.stream_position" title="stream_position">stream_position</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">tokio</a>::<wbr><a href="index.html">io</a></span><h1>Trait <span class="trait">AsyncSeekExt</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/io/util/async_seek_ext.rs.html#33-90">Source</a> </span></div><pre class="rust item-decl"><code>pub trait AsyncSeekExt: <a class="trait" href="trait.AsyncSeek.html" title="trait tokio::io::AsyncSeek">AsyncSeek</a> {
|
||||
// Provided methods
|
||||
fn <a href="#method.seek" class="fn">seek</a>(&mut self, pos: <a class="enum" href="https://doc.rust-lang.org/1.84.1/std/io/enum.SeekFrom.html" title="enum std::io::SeekFrom">SeekFrom</a>) -> Seek<'_, Self>
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.rewind" class="fn">rewind</a>(&mut self) -> Seek<'_, Self>
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.stream_position" class="fn">stream_position</a>(&mut self) -> Seek<'_, Self>
|
||||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a></span> { ... }
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An extension trait that adds utility methods to <a href="trait.AsyncSeek.html" title="trait tokio::io::AsyncSeek"><code>AsyncSeek</code></a> types.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::io::{<span class="self">self</span>, Cursor, SeekFrom};
|
||||
<span class="kw">use </span>tokio::io::{AsyncSeekExt, AsyncReadExt};
|
||||
|
||||
<span class="attr">#[tokio::main]
|
||||
</span><span class="kw">async fn </span>main() -> io::Result<()> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>cursor = Cursor::new(<span class="string">b"abcdefg"</span>);
|
||||
|
||||
<span class="comment">// the `seek` method is defined by this trait
|
||||
</span>cursor.seek(SeekFrom::Start(<span class="number">3</span>)).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buf = [<span class="number">0</span>; <span class="number">1</span>];
|
||||
<span class="kw">let </span>n = cursor.read(<span class="kw-2">&mut </span>buf).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="macro">assert_eq!</span>(n, <span class="number">1</span>);
|
||||
<span class="macro">assert_eq!</span>(buf, [<span class="string">b'd'</span>]);
|
||||
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
<p>See <a href="index.html" title="mod tokio::io">module</a> documentation for more details.</p>
|
||||
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.seek" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_seek_ext.rs.html#63-68">Source</a><h4 class="code-header">fn <a href="#method.seek" class="fn">seek</a>(&mut self, pos: <a class="enum" href="https://doc.rust-lang.org/1.84.1/std/io/enum.SeekFrom.html" title="enum std::io::SeekFrom">SeekFrom</a>) -> Seek<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Creates a future which will seek an IO object, and then yield the
|
||||
new position in the object and the object itself.</p>
|
||||
<p>Equivalent to:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">async fn </span>seek(<span class="kw-2">&mut </span><span class="self">self</span>, pos: SeekFrom) -> io::Result<u64>;</code></pre></div>
|
||||
<p>In the case of an error the buffer and the object will be discarded, with
|
||||
the error yielded.</p>
|
||||
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tokio::fs::File;
|
||||
<span class="kw">use </span>tokio::io::{AsyncSeekExt, AsyncReadExt};
|
||||
|
||||
<span class="kw">use </span>std::io::SeekFrom;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>file = File::open(<span class="string">"foo.txt"</span>).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
file.seek(SeekFrom::Start(<span class="number">6</span>)).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>contents = <span class="macro">vec!</span>[<span class="number">0u8</span>; <span class="number">10</span>];
|
||||
file.read_exact(<span class="kw-2">&mut </span>contents).<span class="kw">await</span><span class="question-mark">?</span>;</code></pre></div>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.rewind" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_seek_ext.rs.html#73-78">Source</a><h4 class="code-header">fn <a href="#method.rewind" class="fn">rewind</a>(&mut self) -> Seek<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Creates a future which will rewind to the beginning of the stream.</p>
|
||||
<p>This is convenience method, equivalent to <code>self.seek(SeekFrom::Start(0))</code>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.stream_position" class="method"><a class="src rightside" href="../../src/tokio/io/util/async_seek_ext.rs.html#84-89">Source</a><h4 class="code-header">fn <a href="#method.stream_position" class="fn">stream_position</a>(&mut self) -> Seek<'_, Self><div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h4></section></summary><div class="docblock"><p>Creates a future which will return the current seek position from the
|
||||
start of the stream.</p>
|
||||
<p>This is equivalent to <code>self.seek(SeekFrom::Current(0))</code>.</p>
|
||||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-AsyncSeekExt-for-S" class="impl"><a class="src rightside" href="../../src/tokio/io/util/async_seek_ext.rs.html#93">Source</a><a href="#impl-AsyncSeekExt-for-S" class="anchor">§</a><h3 class="code-header">impl<S: <a class="trait" href="trait.AsyncSeek.html" title="trait tokio::io::AsyncSeek">AsyncSeek</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="trait.AsyncSeekExt.html" title="trait tokio::io::AsyncSeekExt">AsyncSeekExt</a> for S</h3></section></div><script src="../../trait.impl/tokio/io/util/async_seek_ext/trait.AsyncSeekExt.js" async></script></section></div></main></body></html>
|
||||
233
tokio/io/trait.AsyncWrite.html
Normal file
233
tokio/io/trait.AsyncWrite.html
Normal file
File diff suppressed because one or more lines are too long
895
tokio/io/trait.AsyncWriteExt.html
Normal file
895
tokio/io/trait.AsyncWriteExt.html
Normal file
File diff suppressed because one or more lines are too long
10
tokio/io/unix/index.html
Normal file
10
tokio/io/unix/index.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<!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="Asynchronous IO structures specific to Unix-like operating systems."><title>tokio::io::unix - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module unix</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In tokio::<wbr>io</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">tokio</a>::<wbr><a href="../index.html">io</a></span><h1>Module <span>unix</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/io/mod.rs.html#249">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Asynchronous IO structures specific to Unix-like operating systems.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.AsyncFd.html" title="struct tokio::io::unix::AsyncFd">AsyncFd</a></div><div class="desc docblock-short">Associates an IO object backed by a Unix file descriptor with the tokio
|
||||
reactor, allowing for readiness to be polled. The file descriptor must be of
|
||||
a type that can be used with the OS polling facilities (ie, <code>poll</code>, <code>epoll</code>,
|
||||
<code>kqueue</code>, etc), such as a network socket or pipe, and the file descriptor
|
||||
must have the nonblocking mode set to true.</div></li><li><div class="item-name"><a class="struct" href="struct.AsyncFdReadyGuard.html" title="struct tokio::io::unix::AsyncFdReadyGuard">Async<wbr>FdReady<wbr>Guard</a></div><div class="desc docblock-short">Represents an IO-ready event detected on a particular file descriptor that
|
||||
has not yet been acknowledged. This is a <code>must_use</code> structure to help ensure
|
||||
that you do not forget to explicitly clear (or not clear) the event.</div></li><li><div class="item-name"><a class="struct" href="struct.AsyncFdReadyMutGuard.html" title="struct tokio::io::unix::AsyncFdReadyMutGuard">Async<wbr>FdReady<wbr>MutGuard</a></div><div class="desc docblock-short">Represents an IO-ready event detected on a particular file descriptor that
|
||||
has not yet been acknowledged. This is a <code>must_use</code> structure to help ensure
|
||||
that you do not forget to explicitly clear (or not clear) the event.</div></li><li><div class="item-name"><a class="struct" href="struct.AsyncFdTryNewError.html" title="struct tokio::io::unix::AsyncFdTryNewError">Async<wbr>FdTry<wbr>NewError</a></div><div class="desc docblock-short">Error returned by <a href="struct.AsyncFd.html#method.try_new" title="associated function tokio::io::unix::AsyncFd::try_new"><code>try_new</code></a> or <a href="struct.AsyncFd.html#method.try_with_interest" title="associated function tokio::io::unix::AsyncFd::try_with_interest"><code>try_with_interest</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.TryIoError.html" title="struct tokio::io::unix::TryIoError">TryIo<wbr>Error</a></div><div class="desc docblock-short">The error type returned by <a href="struct.AsyncFdReadyGuard.html#method.try_io" title="method tokio::io::unix::AsyncFdReadyGuard::try_io"><code>try_io</code></a>.</div></li></ul></section></div></main></body></html>
|
||||
1
tokio/io/unix/sidebar-items.js
Normal file
1
tokio/io/unix/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["AsyncFd","AsyncFdReadyGuard","AsyncFdReadyMutGuard","AsyncFdTryNewError","TryIoError"]};
|
||||
590
tokio/io/unix/struct.AsyncFd.html
Normal file
590
tokio/io/unix/struct.AsyncFd.html
Normal file
File diff suppressed because one or more lines are too long
163
tokio/io/unix/struct.AsyncFdReadyGuard.html
Normal file
163
tokio/io/unix/struct.AsyncFdReadyGuard.html
Normal file
File diff suppressed because one or more lines are too long
132
tokio/io/unix/struct.AsyncFdReadyMutGuard.html
Normal file
132
tokio/io/unix/struct.AsyncFdReadyMutGuard.html
Normal file
File diff suppressed because one or more lines are too long
19
tokio/io/unix/struct.AsyncFdTryNewError.html
Normal file
19
tokio/io/unix/struct.AsyncFdTryNewError.html
Normal file
File diff suppressed because one or more lines are too long
13
tokio/io/unix/struct.TryIoError.html
Normal file
13
tokio/io/unix/struct.TryIoError.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!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="The error type returned by `try_io`."><title>TryIoError in tokio::io::unix - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-42caa33d.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.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../tokio/index.html">tokio</a><span class="version">1.42.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">TryIo<wbr>Error</a></h2><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-TryIoError" 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-Freeze-for-TryIoError" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-TryIoError" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-TryIoError" title="Send">Send</a></li><li><a href="#impl-Sync-for-TryIoError" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-TryIoError" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-TryIoError" title="UnwindSafe">UnwindSafe</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>io::<wbr>unix</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">tokio</a>::<wbr><a href="../index.html">io</a>::<wbr><a href="index.html">unix</a></span><h1>Struct <span class="struct">TryIoError</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/io/async_fd.rs.html#1395">Source</a> </span></div><pre class="rust item-decl"><code>pub struct TryIoError(<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>The error type returned by <a href="struct.AsyncFdReadyGuard.html#method.try_io" title="method tokio::io::unix::AsyncFdReadyGuard::try_io"><code>try_io</code></a>.</p>
|
||||
<p>This error indicates that the IO resource returned a <a href="https://doc.rust-lang.org/1.84.1/std/io/error/enum.ErrorKind.html#variant.WouldBlock" title="variant std::io::error::ErrorKind::WouldBlock"><code>WouldBlock</code></a> error.</p>
|
||||
</div></details><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-TryIoError" class="impl"><a class="src rightside" href="../../../src/tokio/io/async_fd.rs.html#1394">Source</a><a href="#impl-Debug-for-TryIoError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.TryIoError.html" title="struct tokio::io::unix::TryIoError">TryIoError</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/io/async_fd.rs.html#1394">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.84.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.84.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-TryIoError" class="impl"><a href="#impl-Freeze-for-TryIoError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.TryIoError.html" title="struct tokio::io::unix::TryIoError">TryIoError</a></h3></section><section id="impl-RefUnwindSafe-for-TryIoError" class="impl"><a href="#impl-RefUnwindSafe-for-TryIoError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.TryIoError.html" title="struct tokio::io::unix::TryIoError">TryIoError</a></h3></section><section id="impl-Send-for-TryIoError" class="impl"><a href="#impl-Send-for-TryIoError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.TryIoError.html" title="struct tokio::io::unix::TryIoError">TryIoError</a></h3></section><section id="impl-Sync-for-TryIoError" class="impl"><a href="#impl-Sync-for-TryIoError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.TryIoError.html" title="struct tokio::io::unix::TryIoError">TryIoError</a></h3></section><section id="impl-Unpin-for-TryIoError" class="impl"><a href="#impl-Unpin-for-TryIoError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.TryIoError.html" title="struct tokio::io::unix::TryIoError">TryIoError</a></h3></section><section id="impl-UnwindSafe-for-TryIoError" class="impl"><a href="#impl-UnwindSafe-for-TryIoError" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.TryIoError.html" title="struct tokio::io::unix::TryIoError">TryIoError</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.84.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.84.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.84.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.84.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.84.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.84.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.84.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.84.1/src/core/borrow.rs.html#209">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.84.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.84.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.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/borrow.rs.html#217">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.84.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.84.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.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.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.84.1/src/core/convert/mod.rs.html#765">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.84.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.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#748-750">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/src/core/convert/mod.rs.html#805-807">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#790-792">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.84.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.84.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.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.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.84.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.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.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>
|
||||
11
tokio/io/util/async_buf_read_ext/trait.AsyncBufReadExt.html
Normal file
11
tokio/io/util/async_buf_read_ext/trait.AsyncBufReadExt.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/trait.AsyncBufReadExt.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/trait.AsyncBufReadExt.html">../../../../tokio/io/trait.AsyncBufReadExt.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/trait.AsyncBufReadExt.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/async_read_ext/trait.AsyncReadExt.html
Normal file
11
tokio/io/util/async_read_ext/trait.AsyncReadExt.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/trait.AsyncReadExt.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/trait.AsyncReadExt.html">../../../../tokio/io/trait.AsyncReadExt.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/trait.AsyncReadExt.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/async_seek_ext/trait.AsyncSeekExt.html
Normal file
11
tokio/io/util/async_seek_ext/trait.AsyncSeekExt.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/trait.AsyncSeekExt.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/trait.AsyncSeekExt.html">../../../../tokio/io/trait.AsyncSeekExt.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/trait.AsyncSeekExt.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/async_write_ext/trait.AsyncWriteExt.html
Normal file
11
tokio/io/util/async_write_ext/trait.AsyncWriteExt.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/trait.AsyncWriteExt.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/trait.AsyncWriteExt.html">../../../../tokio/io/trait.AsyncWriteExt.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/trait.AsyncWriteExt.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/buf_reader/struct.BufReader.html
Normal file
11
tokio/io/util/buf_reader/struct.BufReader.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.BufReader.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.BufReader.html">../../../../tokio/io/struct.BufReader.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.BufReader.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/buf_stream/struct.BufStream.html
Normal file
11
tokio/io/util/buf_stream/struct.BufStream.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.BufStream.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.BufStream.html">../../../../tokio/io/struct.BufStream.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.BufStream.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/buf_writer/struct.BufWriter.html
Normal file
11
tokio/io/util/buf_writer/struct.BufWriter.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.BufWriter.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.BufWriter.html">../../../../tokio/io/struct.BufWriter.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.BufWriter.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/copy/fn.copy.html
Normal file
11
tokio/io/util/copy/fn.copy.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.copy.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.copy.html">../../../../tokio/io/fn.copy.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.copy.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/copy_bidirectional/fn.copy_bidirectional.html
Normal file
11
tokio/io/util/copy_bidirectional/fn.copy_bidirectional.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.copy_bidirectional.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.copy_bidirectional.html">../../../../tokio/io/fn.copy_bidirectional.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.copy_bidirectional.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.copy_bidirectional_with_sizes.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.copy_bidirectional_with_sizes.html">../../../../tokio/io/fn.copy_bidirectional_with_sizes.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.copy_bidirectional_with_sizes.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/copy_buf/fn.copy_buf.html
Normal file
11
tokio/io/util/copy_buf/fn.copy_buf.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.copy_buf.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.copy_buf.html">../../../../tokio/io/fn.copy_buf.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.copy_buf.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/empty/fn.empty.html
Normal file
11
tokio/io/util/empty/fn.empty.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.empty.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.empty.html">../../../../tokio/io/fn.empty.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.empty.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/empty/struct.Empty.html
Normal file
11
tokio/io/util/empty/struct.Empty.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.Empty.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.Empty.html">../../../../tokio/io/struct.Empty.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.Empty.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/lines/struct.Lines.html
Normal file
11
tokio/io/util/lines/struct.Lines.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.Lines.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.Lines.html">../../../../tokio/io/struct.Lines.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.Lines.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/mem/fn.duplex.html
Normal file
11
tokio/io/util/mem/fn.duplex.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.duplex.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.duplex.html">../../../../tokio/io/fn.duplex.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.duplex.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/mem/fn.simplex.html
Normal file
11
tokio/io/util/mem/fn.simplex.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.simplex.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.simplex.html">../../../../tokio/io/fn.simplex.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.simplex.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/mem/struct.DuplexStream.html
Normal file
11
tokio/io/util/mem/struct.DuplexStream.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.DuplexStream.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.DuplexStream.html">../../../../tokio/io/struct.DuplexStream.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.DuplexStream.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/mem/struct.SimplexStream.html
Normal file
11
tokio/io/util/mem/struct.SimplexStream.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.SimplexStream.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.SimplexStream.html">../../../../tokio/io/struct.SimplexStream.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.SimplexStream.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/repeat/fn.repeat.html
Normal file
11
tokio/io/util/repeat/fn.repeat.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.repeat.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.repeat.html">../../../../tokio/io/fn.repeat.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.repeat.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/repeat/struct.Repeat.html
Normal file
11
tokio/io/util/repeat/struct.Repeat.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.Repeat.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.Repeat.html">../../../../tokio/io/struct.Repeat.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.Repeat.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/sink/fn.sink.html
Normal file
11
tokio/io/util/sink/fn.sink.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/fn.sink.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/fn.sink.html">../../../../tokio/io/fn.sink.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/fn.sink.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/sink/struct.Sink.html
Normal file
11
tokio/io/util/sink/struct.Sink.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.Sink.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.Sink.html">../../../../tokio/io/struct.Sink.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.Sink.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/split/struct.Split.html
Normal file
11
tokio/io/util/split/struct.Split.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.Split.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.Split.html">../../../../tokio/io/struct.Split.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.Split.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
11
tokio/io/util/take/struct.Take.html
Normal file
11
tokio/io/util/take/struct.Take.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../../tokio/io/struct.Take.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../../tokio/io/struct.Take.html">../../../../tokio/io/struct.Take.html</a>...</p>
|
||||
<script>location.replace("../../../../tokio/io/struct.Take.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue