Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
Reads all bytes until EOF in this source, appending them to buf.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
Reads all bytes until EOF in this source, placing them into buf.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Reads the exact number of bytes required to fill buf.
method alloc Stable since 1.6.0 Version 1.100.0-nightly
doc.rust-lang.org
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning how many bytes were read.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn chain<R>(self, next: R) -> Chain<Self, R>
Creates an adapter which will chain this stream with another.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn bytes(self) -> Bytes<Self>
Transforms this Read instance to an Iterator over its bytes.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn by_ref(&mut self) -> &mut Self
Creates a "by reference" adapter for this instance of Read.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub trait Read
The Read trait allows for reading bytes from a source.
trait alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn copy<R, W>(reader: &mut R, writer: &mut W) -> crate::io::Result<u64>
Copies the entire contents of a reader into a writer.
function alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct LineWriter<W>
Wraps a writer and buffers output to it, flushing whenever a newline (0x0a, '\n') is detected.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct WriterPanicked
Error returned for the buffered data from BufWriter::into_parts, when the underlying writer has previously panicked. Contains the (possibly partly written) buffered data.
struct alloc Stable since 1.56.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct BufWriter<W>
Wraps a writer and buffers its output.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct BufReader<R>
The BufReader<R> struct adds buffering to any reader.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct IntoInnerError<W>
An error returned by BufWriter::into_inner which combines an error that happened while writing out the buffer, and the buffered writer object which may be used to recover from the condition.
struct alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn split(self, byte: u8) -> Split<Self>
Returns an iterator over the contents of this reader split on the byte byte.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn skip_until(&mut self, byte: u8) -> Result<usize>
Skips all bytes until the delimiter byte or EOF is reached.
method alloc Stable since 1.83.0 Version 1.100.0-nightly
doc.rust-lang.org
fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize>
Reads all bytes into buf until the delimiter byte or EOF is reached.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn read_line(&mut self, buf: &mut String) -> Result<usize>
Reads all bytes until a newline (the 0xA byte) is reached, and append them to the provided String buffer.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn lines(self) -> Lines<Self>
Returns an iterator over the lines of this reader.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
fn fill_buf(&mut self) -> Result<&[u8]>
Returns the contents of the internal buffer, filling it with more data, via Read methods, if empty.
method alloc Stable since 1.0.0 Version 1.100.0-nightly
"Unsafe is your friend! It's maybe not a friend like you would invite to your sister's wedding, or the christening of her first-born child. But it's so..."

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.