pub struct Encoder<'o, E: Variant> { /* private fields */ }
Expand description
Stateful Base64 encoder with support for buffered, incremental encoding.
The E
type parameter can be any type which impls Encoding
such as
[Base64
] or [Base64Unpadded
].
Internally it uses a sealed Variant
trait which is an implementation
detail of this crate, and leverages a blanket impl of Encoding
.
Implementations
Create a new decoder for a byte slice containing contiguous (non-newline-delimited) Base64-encoded data.
Encode the provided buffer as Base64, writing it to the output buffer.
Returns
Ok(bytes)
if the expected amount of data was readErr(Error::InvalidLength)
if there is insufficient space in the output buffer