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§
- base64
base64 - Provides the
Base64Builderwhich encodes/decodes streams in base64. - error
- Provides the error types used by the library.
- postcard
postcard - Provides the
Builderforpostcard(Binary serialization/deserialization). - rmp_
serde rmp_serde - Provides the
Builderforrmp-serde(MessagePackserialization/deserialization). - serde_
json serde_json - Provides the
Builderforserde_json(JSON serialization/deserialization).
Structs§
- Buffered
Builder - Type returned by the
bufferedfunction on theRwBuildertrait. It is itself anRwBuilderso can be chained further. - BzBuilder
bzip2 - Type returned by the
bzip2function on theRwBuilderExttrait. It is itself anRwBuilderso can be chained further. - BzCompression
bzip2 - When compressing data, the compression level can be specified by a value in this enum.
- Compression
flate2 - When compressing data, the compression level can be specified by a value in this struct.
- Compression
Builder flate2 - Type returned by the
deflate,gzandzlibfunctions on theRwBuildertrait. It is itself anRwBuilderso can be chained further. - Crc32
Fast Builder crc32fast - A builder that computes a CRC32 checksum using
crc32fast - Crc32
Fast Reader crc32fast - A reader wrapper that computes a CRC32 checksum
- Crc32
Fast Writer crc32fast - A writer wrapper that computes a CRC32 checksum
- CrcBuilder
flate2 - Type returned by the
crcfunction on theRwBuildertrait. It is itself anRwBuilderso can be chained further, although this is an uncommon scenario - Digest
Builder digest - A builder that computes a cryptographic hash or checksum on the stream.
- Digest
Reader digest - A reader wrapper that computes a digest while reading.
- Digest
Writer digest - A writer wrapper that computes a digest while writing.
- File
Builder - 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. - Lz4Builder
lz4_flex - Type returned by the
lz4_flexfunction on theRwBuilderExttrait. It is itself anRwBuilderso can be chained further. - Process
Builder - 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. - TcpStream
Builder - 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
Vecin memory. It is itself anRwBuilder, but can’t be created through one. This is why we call it a source. - Wincode
Builder wincode - Type returned by the
wincodefunction on theRwBuildertrait. It is itself not anRwBuilderso can’t be chained further. This is why we call it a sink. - Zstd
Builder zstd - Type returned by the
zstdfunction on theRwBuilderExttrait. It is itself anRwBuilderso can be chained further.
Traits§
- Adhoc
Writer - Creates a writer and writes the string to it
- Constructor
flate2 - 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
- RwBuilder
Ext - Extension trait providing combinator methods for
RwBuilderinstances - SerDe
wincode - Trait to wrap serialization and deserialization functionality behind uniform load and save functions
Type Aliases§
- Aes128
Ctr aes_ctr - Internal type for AES-128-CTR cipher
- Aes128
CtrBuilder aes_ctr - The type returned by the
aes128_ctrfunction in theRwBuildertrait - Aes128
Key aes_ctr - The key type for the AES-128-CTR cipher
- Aes256
Ctr aes_ctr - Internal type for AES-256-CTR cipher
- Aes256
CtrBuilder aes_ctr - The type returned by the
aes256_ctrfunction in theRwBuildertrait - Aes256
Key aes_ctr - The key type for the AES-256-CTR cipher
- AesNonce
aes_ctr - The nonce type for AES-CTR cipher
- ChaCha20
Builder chacha20 - The type returned by the
chacha20function in theRwBuildertrait - ChaCha20
Key chacha20 - The key type for the chacha20 cipher
- ChaCha20
Nonce chacha20 - The nonce type for the chacha20 cipher (12 bytes for IETF variant)
- Salsa20
Builder salsa20 - The type returned by the
salsa20function in theRwBuildertrait - Salsa20
Key salsa20 - The key type for the salsa20 cipher
- Salsa20
Nonce salsa20 - The nonce type for the salsa20 cipher
- Sha3_
256Builder sha3 - The type returned by the
sha3_256function in theRwBuildertrait - Sha3_
512Builder sha3 - The type returned by the
sha3_512function in theRwBuildertrait - Sha256
Builder sha2 - The type returned by the
sha256function in theRwBuildertrait - Sha512
Builder sha2 - The type returned by the
sha512function in theRwBuildertrait