[][src]Module radix64::io

Utilities for encoding and decoding from std::io::Read and std::io::Write.

Received base64 encoded data from stdin, decode it, and print it to stdout.

use radix64::{STD, io::DecodeReader};
use std::io;

let mut dst = io::stdout();
let mut src = DecodeReader::new(STD, io::stdin());
io::copy(&mut src, &mut dst)?;

Received data from stdin, encode it, and print it to stdout.

use radix64::{STD, io::EncodeWriter};
use std::io;
let mut dst = EncodeWriter::new(STD, io::stdout());
let mut src = io::stdin();
io::copy(&mut src, &mut dst)?;
dst.finish()?;

Structs

DecodeReader

Decode base64 data from a std::io::Read.

EncodeWriter

Encode base64 data to a std::io::Write.

FinishError

FinishError is returned from EncodeWriter::finish it indicates that the underlying writer returned an error when attempting to write the final chunk. It's possible to recover the EncodeWriter from this error if retrying the finish call is desired.