Skip to main content

Crate qubit_io_text

Crate qubit_io_text 

Source
Expand description

§Qubit Text IO

Synchronous and asynchronous text I/O traits and adapters for Rust.

This crate defines small traits for code that produces or consumes Unicode text without choosing the final byte encoding or storage destination. It also provides adapters for in-memory text, UTF-8 byte streams, and byte-oriented qubit_codec_text charsets. AsyncCharsetTextReader and AsyncCharsetTextWriter drive the same charset state machines through runtime-neutral qubit_io::AsyncByteInput and qubit_io::AsyncByteOutput.

Modules§

prelude
Common text I/O traits and adapters for Qubit Text IO users.

Structs§

AsyncCharsetTextReader
Asynchronously decodes a byte input with a charset codec.
AsyncCharsetTextWriter
Asynchronously encodes Unicode text into a charset byte output.
AsyncUtf8TextReader
Asynchronous UTF-8 reader over a Qubit byte input.
AsyncUtf8TextWriter
Asynchronous UTF-8 writer over a Qubit byte output.
BufferedTextReader
Buffered text reader driven by a byte-to-character transcoder.
BufferedTextWriter
Buffered text writer driven by a character-to-byte transcoder.
CharsetStringDecoder
Convenience decoder for complete inputs that should become a String.
CharsetStringEncoder
Convenience encoder for complete Rust strings.
CharsetTextReader
Text reader that decodes a byte stream with a charset codec.
CharsetTextWriter
Text writer that encodes Unicode text with a charset codec.
InputTextReader
Text reader over a boxed qubit_io::CharInput.
LineEndingSet
A set of line endings accepted by text readers.
OutputTextWriter
Text writer over a boxed qubit_io::CharOutput.
StrCharInput
Character input over a borrowed string slice.
StrTextReader
Text reader over a borrowed string slice.
StringCharInput
Character input over an owned String.
StringCharOutput
Character output over a borrowed String.
StringTextReader
Text reader over an owned string.
StringTextWriter
Text writer over a borrowed String with configurable line endings.
TextAppendLimitError
An error indicating that decoded text exceeded an append-size limit.
TextReaderParts
The components of a buffered text reader that may contain unread state.
Utf8TextReader
Streaming UTF-8 text reader over a Qubit byte input.
Utf8TextWriter
Streaming UTF-8 text writer over a Qubit byte output.

Enums§

LineEnding
Line ending used by text writers when writing a complete line.

Traits§

AsyncTextLineReader
Asynchronously reads text by line while preserving line terminators.
AsyncTextReader
Asynchronously reads Unicode scalar values and strings from a text source.
AsyncTextWriter
Asynchronously writes Unicode text to a text sink.
CharsetReadExt
Extension methods for reading charset-encoded text from byte streams.
CharsetWriteExt
Extension methods for writing charset-encoded text to byte streams.
TextLineReader
Reads text by line while preserving line terminators.
TextReader
Reads Unicode scalar values and strings from a text source.
TextWriter
Writes Unicode text to a text sink.