Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub fn set_nodelay(&self, nodelay: bool) -> io::Result<()>
Sets the value of the TCP_NODELAY option on this socket.
method std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn read_timeout(&self) -> io::Result<Option<Duration>>
Returns the read timeout of this socket.
method std Stable since 1.4.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn peer_addr(&self) -> io::Result<SocketAddr>
Returns the socket address of the remote peer of this TCP connection.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn peek(&self, buf: &mut [u8]) -> io::Result<usize>
Receives data on the socket from the remote address to which it is connected, without removing that data from the queue. On success, returns the number of bytes peeked.
method std Stable since 1.18.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn nodelay(&self) -> io::Result<bool>
Gets the value of the TCP_NODELAY option on this socket.
method std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn local_addr(&self) -> io::Result<SocketAddr>
Returns the socket address of the local half of this TCP connection.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn connect_timeout(addr: &SocketAddr, timeout: Duration) -> io::Result<TcpStream>
Opens a TCP connection to a remote host with a timeout.
associated_function std Stable since 1.21.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn connect<A>(addr: A) -> io::Result<TcpStream>
Opens a TCP connection to a remote host.
associated_function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct TcpStream
A TCP stream between a local and a remote socket.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn ttl(&self) -> io::Result<u32>
Gets the value of the IP_TTL option for this socket.
method std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_clone(&self) -> io::Result<TcpListener>
Creates a new independently owned handle to the underlying socket.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn take_error(&self) -> io::Result<Option<io::Error>>
Gets the value of the SO_ERROR option on this socket.
method std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_ttl(&self, ttl: u32) -> io::Result<()>
Sets the value for the IP_TTL option on this socket.
method std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()>
Moves this TCP stream into or out of nonblocking mode.
method std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn local_addr(&self) -> io::Result<SocketAddr>
Returns the local socket address of this listener.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn incoming(&self) -> Incoming<'_>
Returns an iterator over the connections being received on this listener.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn bind<A>(addr: A) -> io::Result<TcpListener>
Creates a new TcpListener which will be bound to the specified address.
associated_function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn accept(&self) -> io::Result<(TcpStream, SocketAddr)>
Accept a new incoming connection from this listener.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct TcpListener
A TCP socket server, listening for connections.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Incoming<'a>
An iterator that infinitely accepts connections on a TcpListener.
struct std Stable since 1.0.0 Version 1.100.0-nightly
"Panstromek: I remember reading somewhere (probably here) that borrow checking has `O(n^3)` asymptotic complexity, relative to the size of the function..."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.