254 lines
No EOL
39 KiB
HTML
254 lines
No EOL
39 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="generator" content="rustdoc">
|
||
<meta name="description" content="API documentation for the Rust `TcpStream` struct in crate `bitflags`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, TcpStream">
|
||
|
||
<title>bitflags::__core::net::TcpStream - Rust</title>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||
|
||
|
||
|
||
|
||
</head>
|
||
<body class="rustdoc">
|
||
<!--[if lte IE 8]>
|
||
<div class="warning">
|
||
This old browser is unsupported and will most likely display funky
|
||
things.
|
||
</div>
|
||
<![endif]-->
|
||
|
||
|
||
|
||
<nav class="sidebar">
|
||
|
||
<p class='location'><a href='../../index.html'>bitflags</a>::<wbr><a href='../index.html'>__core</a>::<wbr><a href='index.html'>net</a></p><script>window.sidebarCurrent = {name: 'TcpStream', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||
</nav>
|
||
|
||
<nav class="sub">
|
||
<form class="search-form js-only">
|
||
<div class="search-container">
|
||
<input class="search-input" name="search"
|
||
autocomplete="off"
|
||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||
type="search">
|
||
</div>
|
||
</form>
|
||
</nav>
|
||
|
||
<section id='main' class="content struct">
|
||
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>bitflags</a>::<wbr><a href='../index.html'>__core</a>::<wbr><a href='index.html'>net</a>::<wbr><a class='struct' href=''>TcpStream</a></span><span class='out-of-band'><span id='render-detail'>
|
||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||
[<span class='inner'>−</span>]
|
||
</a>
|
||
</span><a id='src-5791' class='srclink' href='https://doc.rust-lang.org/nightly/std/net/tcp/struct.TcpStream.html?gotosrc=5791' title='goto source code'>[src]</a></span></h1>
|
||
<pre class='rust struct'>pub struct TcpStream(_);</pre><span class="since">1.0.0</span><div class='docblock'><p>A structure which represents a TCP stream between a local socket and a
|
||
remote socket.</p>
|
||
|
||
<p>The socket will be closed when the value is dropped.</p>
|
||
|
||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||
<pre class='rust rust-example-rendered'>
|
||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::<span class='ident'>prelude</span>::<span class='op'>*</span>;
|
||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>net</span>::<span class='ident'>TcpStream</span>;
|
||
|
||
{
|
||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>stream</span> <span class='op'>=</span> <span class='ident'>TcpStream</span>::<span class='ident'>connect</span>(<span class='string'>"127.0.0.1:34254"</span>).<span class='ident'>unwrap</span>();
|
||
|
||
<span class='comment'>// ignore the Result</span>
|
||
<span class='kw'>let</span> _ <span class='op'>=</span> <span class='ident'>stream</span>.<span class='ident'>write</span>(<span class='kw-2'>&</span>[<span class='number'>1</span>]);
|
||
<span class='kw'>let</span> _ <span class='op'>=</span> <span class='ident'>stream</span>.<span class='ident'>read</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> [<span class='number'>0</span>; <span class='number'>128</span>]); <span class='comment'>// ignore here too</span>
|
||
} <span class='comment'>// the stream is closed here</span></pre>
|
||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code></h3><div class='impl-items'><h4 id='method.connect' class='method'><code>fn <a href='#method.connect' class='fnname'>connect</a><A>(addr: A) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>> <span class='where'>where A: <a class='trait' href='../../../bitflags/__core/net/trait.ToSocketAddrs.html' title='bitflags::__core::net::ToSocketAddrs'>ToSocketAddrs</a></span></code></h4>
|
||
<div class='docblock'><p>Opens a TCP connection to a remote host.</p>
|
||
|
||
<p><code>addr</code> is an address of the remote host. Anything which implements
|
||
<code>ToSocketAddrs</code> trait can be supplied for the address; see this trait
|
||
documentation for concrete examples.
|
||
In case <code>ToSocketAddrs::to_socket_addrs()</code> returns more than one entry,
|
||
then the first valid and reachable address is used.</p>
|
||
</div><h4 id='method.peer_addr' class='method'><code>fn <a href='#method.peer_addr' class='fnname'>peer_addr</a>(&self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='enum' href='../../../bitflags/__core/net/enum.SocketAddr.html' title='bitflags::__core::net::SocketAddr'>SocketAddr</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<div class='docblock'><p>Returns the socket address of the remote peer of this TCP connection.</p>
|
||
</div><h4 id='method.local_addr' class='method'><code>fn <a href='#method.local_addr' class='fnname'>local_addr</a>(&self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='enum' href='../../../bitflags/__core/net/enum.SocketAddr.html' title='bitflags::__core::net::SocketAddr'>SocketAddr</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<div class='docblock'><p>Returns the socket address of the local half of this TCP connection.</p>
|
||
</div><h4 id='method.shutdown' class='method'><code>fn <a href='#method.shutdown' class='fnname'>shutdown</a>(&self, how: <a class='enum' href='../../../bitflags/__core/net/enum.Shutdown.html' title='bitflags::__core::net::Shutdown'>Shutdown</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<div class='docblock'><p>Shuts down the read, write, or both halves of this connection.</p>
|
||
|
||
<p>This function will cause all pending and future I/O on the specified
|
||
portions to return immediately with an appropriate value (see the
|
||
documentation of <code>Shutdown</code>).</p>
|
||
</div><h4 id='method.try_clone' class='method'><code>fn <a href='#method.try_clone' class='fnname'>try_clone</a>(&self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<div class='docblock'><p>Creates a new independently owned handle to the underlying socket.</p>
|
||
|
||
<p>The returned <code>TcpStream</code> is a reference to the same stream that this
|
||
object references. Both handles will read and write the same stream of
|
||
data, and options set on one stream will be propagated to the other
|
||
stream.</p>
|
||
</div><h4 id='method.set_read_timeout' class='method'><code>fn <a href='#method.set_read_timeout' class='fnname'>set_read_timeout</a>(&self, dur: <a class='enum' href='../../../bitflags/__core/option/enum.Option.html' title='bitflags::__core::option::Option'>Option</a><<a class='struct' href='../../../bitflags/__core/time/struct.Duration.html' title='bitflags::__core::time::Duration'>Duration</a>>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.4.0</span></h4>
|
||
<div class='docblock'><p>Sets the read timeout to the timeout specified.</p>
|
||
|
||
<p>If the value specified is <code>None</code>, then <code>read</code> calls will block
|
||
indefinitely. It is an error to pass the zero <code>Duration</code> to this
|
||
method.</p>
|
||
|
||
<h1 id='note' class='section-header'><a href='#note'>Note</a></h1>
|
||
<p>Platforms may return a different error code whenever a read times out as
|
||
a result of setting this option. For example Unix typically returns an
|
||
error of the kind <code>WouldBlock</code>, but Windows may return <code>TimedOut</code>.</p>
|
||
</div><h4 id='method.set_write_timeout' class='method'><code>fn <a href='#method.set_write_timeout' class='fnname'>set_write_timeout</a>(&self, dur: <a class='enum' href='../../../bitflags/__core/option/enum.Option.html' title='bitflags::__core::option::Option'>Option</a><<a class='struct' href='../../../bitflags/__core/time/struct.Duration.html' title='bitflags::__core::time::Duration'>Duration</a>>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.4.0</span></h4>
|
||
<div class='docblock'><p>Sets the write timeout to the timeout specified.</p>
|
||
|
||
<p>If the value specified is <code>None</code>, then <code>write</code> calls will block
|
||
indefinitely. It is an error to pass the zero <code>Duration</code> to this
|
||
method.</p>
|
||
|
||
<h1 id='note-1' class='section-header'><a href='#note-1'>Note</a></h1>
|
||
<p>Platforms may return a different error code whenever a write times out
|
||
as a result of setting this option. For example Unix typically returns
|
||
an error of the kind <code>WouldBlock</code>, but Windows may return <code>TimedOut</code>.</p>
|
||
</div><h4 id='method.read_timeout' class='method'><code>fn <a href='#method.read_timeout' class='fnname'>read_timeout</a>(&self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='enum' href='../../../bitflags/__core/option/enum.Option.html' title='bitflags::__core::option::Option'>Option</a><<a class='struct' href='../../../bitflags/__core/time/struct.Duration.html' title='bitflags::__core::time::Duration'>Duration</a>>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.4.0</span></h4>
|
||
<div class='docblock'><p>Returns the read timeout of this socket.</p>
|
||
|
||
<p>If the timeout is <code>None</code>, then <code>read</code> calls will block indefinitely.</p>
|
||
|
||
<h1 id='note-2' class='section-header'><a href='#note-2'>Note</a></h1>
|
||
<p>Some platforms do not provide access to the current timeout.</p>
|
||
</div><h4 id='method.write_timeout' class='method'><code>fn <a href='#method.write_timeout' class='fnname'>write_timeout</a>(&self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='enum' href='../../../bitflags/__core/option/enum.Option.html' title='bitflags::__core::option::Option'>Option</a><<a class='struct' href='../../../bitflags/__core/time/struct.Duration.html' title='bitflags::__core::time::Duration'>Duration</a>>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.4.0</span></h4>
|
||
<div class='docblock'><p>Returns the write timeout of this socket.</p>
|
||
|
||
<p>If the timeout is <code>None</code>, then <code>write</code> calls will block indefinitely.</p>
|
||
|
||
<h1 id='note-3' class='section-header'><a href='#note-3'>Note</a></h1>
|
||
<p>Some platforms do not provide access to the current timeout.</p>
|
||
</div><h4 id='method.set_nodelay' class='method'><code>fn <a href='#method.set_nodelay' class='fnname'>set_nodelay</a>(&self, nodelay: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.bool.html'>bool</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.9.0</span></h4>
|
||
<div class='docblock'><p>Sets the value of the <code>TCP_NODELAY</code> option on this socket.</p>
|
||
|
||
<p>If set, this option disables the Nagle algorithm. This means that
|
||
segments are always sent as soon as possible, even if there is only a
|
||
small amount of data. When not set, data is buffered until there is a
|
||
sufficient amount to send out, thereby avoiding the frequent sending of
|
||
small packets.</p>
|
||
</div><h4 id='method.nodelay' class='method'><code>fn <a href='#method.nodelay' class='fnname'>nodelay</a>(&self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.bool.html'>bool</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.9.0</span></h4>
|
||
<div class='docblock'><p>Gets the value of the <code>TCP_NODELAY</code> option on this socket.</p>
|
||
|
||
<p>For more information about this option, see <a href="#method.set_nodelay"><code>set_nodelay</code></a>.</p>
|
||
</div><h4 id='method.set_ttl' class='method'><code>fn <a href='#method.set_ttl' class='fnname'>set_ttl</a>(&self, ttl: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u32.html'>u32</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.9.0</span></h4>
|
||
<div class='docblock'><p>Sets the value for the <code>IP_TTL</code> option on this socket.</p>
|
||
|
||
<p>This value sets the time-to-live field that is used in every packet sent
|
||
from this socket.</p>
|
||
</div><h4 id='method.ttl' class='method'><code>fn <a href='#method.ttl' class='fnname'>ttl</a>(&self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u32.html'>u32</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.9.0</span></h4>
|
||
<div class='docblock'><p>Gets the value of the <code>IP_TTL</code> option for this socket.</p>
|
||
|
||
<p>For more information about this option, see <a href="#method.set_ttl"><code>set_ttl</code></a>.</p>
|
||
</div><h4 id='method.take_error' class='method'><code>fn <a href='#method.take_error' class='fnname'>take_error</a>(&self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='enum' href='../../../bitflags/__core/option/enum.Option.html' title='bitflags::__core::option::Option'>Option</a><<a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.9.0</span></h4>
|
||
<div class='docblock'><p>Get the value of the <code>SO_ERROR</code> option on this socket.</p>
|
||
|
||
<p>This will retrieve the stored error in the underlying socket, clearing
|
||
the field in the process. This can be useful for checking errors between
|
||
calls.</p>
|
||
</div><h4 id='method.set_nonblocking' class='method'><code>fn <a href='#method.set_nonblocking' class='fnname'>set_nonblocking</a>(&self, nonblocking: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.bool.html'>bool</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.9.0</span></h4>
|
||
<div class='docblock'><p>Moves this TCP stream into or out of nonblocking mode.</p>
|
||
|
||
<p>On Unix this corresponds to calling fcntl, and on Windows this
|
||
corresponds to calling ioctlsocket.</p>
|
||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../../../bitflags/__core/io/trait.Read.html' title='bitflags::__core::io::Read'>Read</a> for <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code></h3><div class='impl-items'><h4 id='method.read' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#tymethod.read' class='fnname'>read</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>]</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.usize.html'>usize</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.read_to_end' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.read_to_end' class='fnname'>read_to_end</a>(&mut self, buf: &mut <a class='struct' href='../../../bitflags/__core/vec/struct.Vec.html' title='bitflags::__core::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a>>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.usize.html'>usize</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.read_to_string' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.read_to_string' class='fnname'>read_to_string</a>(&mut self, buf: &mut <a class='struct' href='../../../bitflags/__core/string/struct.String.html' title='bitflags::__core::string::String'>String</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.usize.html'>usize</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.read_exact' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.read_exact' class='fnname'>read_exact</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>]</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.6.0</span></h4>
|
||
<h4 id='method.by_ref' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||
<h4 id='method.bytes' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.bytes' class='fnname'>bytes</a>(self) -> <a class='struct' href='../../../bitflags/__core/io/struct.Bytes.html' title='bitflags::__core::io::Bytes'>Bytes</a><Self></code></h4>
|
||
<h4 id='method.chars' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.chars' class='fnname'>chars</a>(self) -> <a class='struct' href='../../../bitflags/__core/io/struct.Chars.html' title='bitflags::__core::io::Chars'>Chars</a><Self></code></h4>
|
||
<h4 id='method.chain' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.chain' class='fnname'>chain</a><R>(self, next: R) -> <a class='struct' href='../../../bitflags/__core/io/struct.Chain.html' title='bitflags::__core::io::Chain'>Chain</a><Self, R> <span class='where'>where R: <a class='trait' href='../../../bitflags/__core/io/trait.Read.html' title='bitflags::__core::io::Read'>Read</a></span></code></h4>
|
||
<h4 id='method.take' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.take' class='fnname'>take</a>(self, limit: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u64.html'>u64</a>) -> <a class='struct' href='../../../bitflags/__core/io/struct.Take.html' title='bitflags::__core::io::Take'>Take</a><Self></code></h4>
|
||
</div><h3 class='impl'><code>impl <a class='trait' href='../../../bitflags/__core/io/trait.Write.html' title='bitflags::__core::io::Write'>Write</a> for <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code></h3><div class='impl-items'><h4 id='method.write' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#tymethod.write' class='fnname'>write</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>]</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.usize.html'>usize</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.flush' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#tymethod.flush' class='fnname'>flush</a>(&mut self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.write_all' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#method.write_all' class='fnname'>write_all</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>]</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.write_fmt' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#method.write_fmt' class='fnname'>write_fmt</a>(&mut self, fmt: <a class='struct' href='../../../bitflags/__core/fmt/struct.Arguments.html' title='bitflags::__core::fmt::Arguments'>Arguments</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.by_ref-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||
</div><h3 class='impl'><code>impl<'a> <a class='trait' href='../../../bitflags/__core/io/trait.Read.html' title='bitflags::__core::io::Read'>Read</a> for &'a <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code></h3><div class='impl-items'><h4 id='method.read-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#tymethod.read' class='fnname'>read</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>]</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.usize.html'>usize</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.read_to_end-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.read_to_end' class='fnname'>read_to_end</a>(&mut self, buf: &mut <a class='struct' href='../../../bitflags/__core/vec/struct.Vec.html' title='bitflags::__core::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a>>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.usize.html'>usize</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.read_to_string-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.read_to_string' class='fnname'>read_to_string</a>(&mut self, buf: &mut <a class='struct' href='../../../bitflags/__core/string/struct.String.html' title='bitflags::__core::string::String'>String</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.usize.html'>usize</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.read_exact-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.read_exact' class='fnname'>read_exact</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>]</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code><span class="since">1.6.0</span></h4>
|
||
<h4 id='method.by_ref-2' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||
<h4 id='method.bytes-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.bytes' class='fnname'>bytes</a>(self) -> <a class='struct' href='../../../bitflags/__core/io/struct.Bytes.html' title='bitflags::__core::io::Bytes'>Bytes</a><Self></code></h4>
|
||
<h4 id='method.chars-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.chars' class='fnname'>chars</a>(self) -> <a class='struct' href='../../../bitflags/__core/io/struct.Chars.html' title='bitflags::__core::io::Chars'>Chars</a><Self></code></h4>
|
||
<h4 id='method.chain-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.chain' class='fnname'>chain</a><R>(self, next: R) -> <a class='struct' href='../../../bitflags/__core/io/struct.Chain.html' title='bitflags::__core::io::Chain'>Chain</a><Self, R> <span class='where'>where R: <a class='trait' href='../../../bitflags/__core/io/trait.Read.html' title='bitflags::__core::io::Read'>Read</a></span></code></h4>
|
||
<h4 id='method.take-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Read.html#method.take' class='fnname'>take</a>(self, limit: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u64.html'>u64</a>) -> <a class='struct' href='../../../bitflags/__core/io/struct.Take.html' title='bitflags::__core::io::Take'>Take</a><Self></code></h4>
|
||
</div><h3 class='impl'><code>impl<'a> <a class='trait' href='../../../bitflags/__core/io/trait.Write.html' title='bitflags::__core::io::Write'>Write</a> for &'a <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code></h3><div class='impl-items'><h4 id='method.write-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#tymethod.write' class='fnname'>write</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>]</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.usize.html'>usize</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.flush-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#tymethod.flush' class='fnname'>flush</a>(&mut self) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.write_all-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#method.write_all' class='fnname'>write_all</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.slice.html'>]</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.write_fmt-1' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#method.write_fmt' class='fnname'>write_fmt</a>(&mut self, fmt: <a class='struct' href='../../../bitflags/__core/fmt/struct.Arguments.html' title='bitflags::__core::fmt::Arguments'>Arguments</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/io/struct.Error.html' title='bitflags::__core::io::Error'>Error</a>></code></h4>
|
||
<h4 id='method.by_ref-3' class='method'><code>fn <a href='../../../bitflags/__core/io/trait.Write.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||
</div><h3 class='impl'><code>impl <a class='trait' href='../../../bitflags/__core/fmt/trait.Debug.html' title='bitflags::__core::fmt::Debug'>Debug</a> for <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='../../../bitflags/__core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='../../../bitflags/__core/fmt/struct.Formatter.html' title='bitflags::__core::fmt::Formatter'>Formatter</a>) -> <a class='enum' href='../../../bitflags/__core/result/enum.Result.html' title='bitflags::__core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.tuple.html'>()</a>, <a class='struct' href='../../../bitflags/__core/fmt/struct.Error.html' title='bitflags::__core::fmt::Error'>Error</a>></code></h4>
|
||
</div><h3 class='impl'><code>impl <a class='trait' href='../../../bitflags/__core/os/ext/prelude/trait.AsRawFd.html' title='bitflags::__core::os::ext::prelude::AsRawFd'>AsRawFd</a> for <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code></h3><div class='impl-items'><h4 id='method.as_raw_fd' class='method'><code>fn <a href='../../../bitflags/__core/os/ext/prelude/trait.AsRawFd.html#tymethod.as_raw_fd' class='fnname'>as_raw_fd</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.i32.html'>i32</a></code></h4>
|
||
</div><h3 class='impl'><code>impl <a class='trait' href='../../../bitflags/__core/os/ext/prelude/trait.FromRawFd.html' title='bitflags::__core::os::ext::prelude::FromRawFd'>FromRawFd</a> for <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code><span class="since">1.1.0</span></h3><div class='impl-items'><h4 id='method.from_raw_fd' class='method'><code>unsafe fn <a href='../../../bitflags/__core/os/ext/prelude/trait.FromRawFd.html#tymethod.from_raw_fd' class='fnname'>from_raw_fd</a>(fd: <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.i32.html'>i32</a>) -> <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code></h4>
|
||
</div><h3 class='impl'><code>impl <a class='trait' href='../../../bitflags/__core/os/ext/prelude/trait.IntoRawFd.html' title='bitflags::__core::os::ext::prelude::IntoRawFd'>IntoRawFd</a> for <a class='struct' href='../../../bitflags/__core/net/struct.TcpStream.html' title='bitflags::__core::net::TcpStream'>TcpStream</a></code><span class="since">1.4.0</span></h3><div class='impl-items'><h4 id='method.into_raw_fd' class='method'><code>fn <a href='../../../bitflags/__core/os/ext/prelude/trait.IntoRawFd.html#tymethod.into_raw_fd' class='fnname'>into_raw_fd</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/bitflags/primitive.i32.html'>i32</a></code></h4>
|
||
</div></section>
|
||
<section id='search' class="content hidden"></section>
|
||
|
||
<section class="footer"></section>
|
||
|
||
<aside id="help" class="hidden">
|
||
<div>
|
||
<h1 class="hidden">Help</h1>
|
||
|
||
<div class="shortcuts">
|
||
<h2>Keyboard Shortcuts</h2>
|
||
|
||
<dl>
|
||
<dt>?</dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt>S</dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt>⇤</dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt>⇥</dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt>⏎</dt>
|
||
<dd>Go to active search result</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div class="infos">
|
||
<h2>Search Tricks</h2>
|
||
|
||
<p>
|
||
Prefix searches with a type followed by a colon (e.g.
|
||
<code>fn:</code>) to restrict the search to a given type.
|
||
</p>
|
||
|
||
<p>
|
||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||
<code>struct</code>, <code>enum</code>,
|
||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||
and <code>const</code>.
|
||
</p>
|
||
|
||
<p>
|
||
Search functions by type signature (e.g.
|
||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../../../";
|
||
window.currentCrate = "bitflags";
|
||
window.playgroundUrl = "";
|
||
</script>
|
||
<script src="../../../jquery.js"></script>
|
||
<script src="../../../main.js"></script>
|
||
|
||
<script defer src="../../../search-index.js"></script>
|
||
</body>
|
||
</html> |