Skip to main content

Crate rw_builder

Crate rw_builder 

Source
Expand description

rw-builder provides a convenient way to build std::io::Readers and std::io::Writers by chaining transformations. Since readers and writers are defined simultaneously through the same builder they can be used as inverses of each other.

Re-exports§

pub use error::Error;
pub use error::Result;
pub use crate::base64::Base64Builder;base64

Modules§

base64base64
Provides the Base64Builder which encodes/decodes streams in base64.
error
Provides the error types used by the library.
postcardpostcard
Provides the Builder for postcard (Binary serialization/deserialization).
rmp_serdermp_serde
Provides the Builder for rmp-serde (MessagePack serialization/deserialization).
serde_jsonserde_json
Provides the Builder for serde_json (JSON serialization/deserialization).

Structs§

BufferedBuilder
Type returned by the buffered function on the RwBuilder trait. It is itself an RwBuilder so can be chained further.
BzBuilderbzip2
Type returned by the bzip2 function on the RwBuilderExt trait. It is itself an RwBuilder so can be chained further.
BzCompressionbzip2
When compressing data, the compression level can be specified by a value in this enum.
Compressionflate2
When compressing data, the compression level can be specified by a value in this struct.
CompressionBuilderflate2
Type returned by the deflate, gz and zlib functions on the RwBuilder trait. It is itself an RwBuilder so can be chained further.
Crc32FastBuildercrc32fast
A builder that computes a CRC32 checksum using crc32fast
Crc32FastReadercrc32fast
A reader wrapper that computes a CRC32 checksum
Crc32FastWritercrc32fast
A writer wrapper that computes a CRC32 checksum
CrcBuilderflate2
Type returned by the crc function on the RwBuilder trait. It is itself an RwBuilder so can be chained further, although this is an uncommon scenario
DigestBuilderdigest
A builder that computes a cryptographic hash or checksum on the stream.
DigestReaderdigest
A reader wrapper that computes a digest while reading.
DigestWriterdigest
A writer wrapper that computes a digest while writing.
FileBuilder
Type for building readers and writers on top of a file handle. It is itself an RwBuilder, but can’t be created through one. This is why we call it a source.
Lz4Builderlz4_flex
Type returned by the lz4_flex function on the RwBuilderExt trait. It is itself an RwBuilder so can be chained further.
ProcessBuilder
Type for building readers and writers on top of a process handle. It is itself an RwBuilder, but can’t be created through one. This is why we call it a source.
TcpStreamBuilder
Type for building readers and writers on top of a connected TCP socket. It is itself an RwBuilder, but can’t be created through one. This is why we call it a source.
VecBuilder
Type for building readers and writers on top of a Vec in memory. It is itself an RwBuilder, but can’t be created through one. This is why we call it a source.
WincodeBuilderwincode
Type returned by the wincode function on the RwBuilder trait. It is itself not an RwBuilder so can’t be chained further. This is why we call it a sink.
ZstdBuilderzstd
Type returned by the zstd function on the RwBuilderExt trait. It is itself an RwBuilder so can be chained further.

Traits§

AdhocWriter
Creates a writer and writes the string to it
Constructorflate2
Convenience trait for creating a new encoder/decoder builder
RwBuilder
The trait that can construct readers and writers, but also has chainable functions to create more complex builders
RwBuilderExt
Extension trait providing combinator methods for RwBuilder instances
SerDewincode
Trait to wrap serialization and deserialization functionality behind uniform load and save functions

Type Aliases§

Aes128Ctraes_ctr
Internal type for AES-128-CTR cipher
Aes128CtrBuilderaes_ctr
The type returned by the aes128_ctr function in the RwBuilder trait
Aes128Keyaes_ctr
The key type for the AES-128-CTR cipher
Aes256Ctraes_ctr
Internal type for AES-256-CTR cipher
Aes256CtrBuilderaes_ctr
The type returned by the aes256_ctr function in the RwBuilder trait
Aes256Keyaes_ctr
The key type for the AES-256-CTR cipher
AesNonceaes_ctr
The nonce type for AES-CTR cipher
ChaCha20Builderchacha20
The type returned by the chacha20 function in the RwBuilder trait
ChaCha20Keychacha20
The key type for the chacha20 cipher
ChaCha20Noncechacha20
The nonce type for the chacha20 cipher (12 bytes for IETF variant)
Salsa20Buildersalsa20
The type returned by the salsa20 function in the RwBuilder trait
Salsa20Keysalsa20
The key type for the salsa20 cipher
Salsa20Noncesalsa20
The nonce type for the salsa20 cipher
Sha3_256Buildersha3
The type returned by the sha3_256 function in the RwBuilder trait
Sha3_512Buildersha3
The type returned by the sha3_512 function in the RwBuilder trait
Sha256Buildersha2
The type returned by the sha256 function in the RwBuilder trait
Sha512Buildersha2
The type returned by the sha512 function in the RwBuilder trait