doc.rust-lang.org
pub struct NulError
An error indicating that an interior nul byte was found.
struct
alloc
Stable since 1.64.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_vec(self) -> Vec<u8>
Consumes this error, returning the underlying vector of bytes which generated the error in the first place.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn nul_position(&self) -> usize
Returns the position of the nul byte in the slice that caused CString::new to fail.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod fmt
Utilities for formatting and printing Strings.
module
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn format(args: Arguments<'_>) -> string::String
Takes an Arguments struct and returns the resulting formatted string.
function
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro format!
Creates a String using interpolation of runtime expressions.
macro
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait BufRead
A BufRead is a type of Reader which has an internal buffer, allowing it to perform extra ways of reading.
trait
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
fn consume(&mut self, amount: usize)
Marks the given amount of additional bytes from the internal buffer as having been read. Subsequent calls to read only return bytes that have not been marked as read.
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
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 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 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 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 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
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
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 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 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 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 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