Module io

Source

Modules§

preludestd
The I/O Prelude.

Macros§

const_errorExperimentalstd
Creates a new I/O error from a known kind of error and a string literal.

Structs§

BufReaderstd
The BufReader<R> struct adds buffering to any reader.
BufWriterstd
Wraps a writer and buffers its output.
Bytesstd
An iterator over u8 values of a reader.
Chainstd
Adapter to chain together two readers.
Cursorstd
A Cursor wraps an in-memory buffer and provides it with a Seek implementation.
Emptystd
Empty ignores any data written via Write, and will always be empty (returning zero bytes) when read via Read.
Errorstd
The error type for I/O operations of the Read, Write, Seek, and associated traits.
IntoInnerErrorstd
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.
IoSlicestd
A buffer type used with Write::write_vectored.
IoSliceMutstd
A buffer type used with Read::read_vectored.
LineWriterstd
Wraps a writer and buffers output to it, flushing whenever a newline (0x0a, '\n') is detected.
Linesstd
An iterator over the lines of an instance of BufRead.
Repeatstd
A reader which yields one byte over and over and over and over and over and…
Sinkstd
A writer which will move data into the void.
Splitstd
An iterator over the contents of an instance of BufRead split on a particular byte.
Stderrstd
A handle to the standard error stream of a process.
StderrLockstd
A locked reference to the Stderr handle.
Stdinstd
A handle to the standard input stream of a process.
StdinLockstd
A locked reference to the Stdin handle.
Stdoutstd
A handle to the global standard output stream of the current process.
StdoutLockstd
A locked reference to the Stdout handle.
Takestd
Reader adapter which limits the bytes read from an underlying reader.
WriterPanickedstd
Error returned for the buffered data from BufWriter::into_parts, when the underlying writer has previously panicked. Contains the (possibly partly written) buffered data.
BorrowedBufExperimentalstd
A borrowed byte buffer which is incrementally filled and initialized.
BorrowedCursorExperimentalstd
A writeable view of the unfilled portion of a BorrowedBuf.
PipeReaderExperimentalstd
Read end of an anonymous pipe.
PipeWriterExperimentalstd
Write end of an anonymous pipe.

Enums§

ErrorKindstd
A list specifying general categories of I/O error.
SeekFromstd
Enumeration of possible methods to seek within an I/O object.

Traits§

BufReadstd
A BufRead is a type of Reader which has an internal buffer, allowing it to perform extra ways of reading.
IsTerminalstd
Trait to determine if a descriptor/handle refers to a terminal/tty.
Readstd
The Read trait allows for reading bytes from a source.
Seekstd
The Seek trait provides a cursor which can be moved within a stream of bytes.
Writestd
A trait for objects which are byte-oriented sinks.

Functions§

copystd
Copies the entire contents of a reader into a writer.
emptystd
Creates a value that is always at EOF for reads, and ignores all data written.
read_to_stringstd
Reads all bytes from a reader into a new String.
repeatstd
Creates an instance of a reader that infinitely repeats one byte.
sinkstd
Creates an instance of a writer which will successfully consume all data.
stderrstd
Constructs a new handle to the standard error of the current process.
stdinstd
Constructs a new handle to the standard input of the current process.
stdoutstd
Constructs a new handle to the standard output of the current process.
pipeExperimentalstd
Create an anonymous pipe.

Type Aliases§

Resultstd
A specialized Result type for I/O operations.
RawOsErrorExperimentalstd
The type of raw OS error codes returned by Error::raw_os_error.