Module io

Source
Expand description

Traits, helpers, and type definitions for core I/O functionality.

This module aims to provide a very similar API to the Rust standard library’s std::io module.

Macros§

dbg
Prints and returns the value of a given expression for quick and dirty debugging.
print
Prints a message to the standard output.
println
Prints a message to the standard output and appends a newline.

Structs§

Bytes
An iterator over u8 values of a reader.
Chain
Adaptor to chain together two readers.
Cursor
A Cursor wraps an in-memory buffer and provides it with a Seek implementation.
Error
The error type for I/O operations of the Read, Write, Seek, and associated traits.
Stdin
A handle to the serial input stream of this program.
StdinLock
A locked serial input stream. Only one of these can exist at a time and reads occur without waiting.
Stdout
A handle to the serial output stream of this program.
StdoutLock
A locked serial output stream. Only one of these can exist at a time and writes occur without waiting.
Take
Reader adaptor which limits the bytes read from an underlying reader.

Enums§

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

Traits§

BufRead
A BufRead is a type of Reader which has an internal buffer, allowing it to perform extra ways of reading.
Read
The Read trait allows for reading bytes from a source.
Seek
The Seek trait provides a cursor which can be moved within a stream of bytes.
Write
A trait for objects which are byte-oriented sinks.

Functions§

stdin
Constructs a handle to the serial input stream.
stdout
Constructs a handle to the serial output stream

Type Aliases§

Result
A specialized Result type for I/O operations.