Function encode
Source pub fn encode(buf: &[u8], variant: Variant) -> Result<String, AlkaliError>
Available on crate feature std only.
Expand description
Encode the contents of buf (raw bytes) as a Base64 string (suitable for printing).
variant should be the Variant to use for encoding.
Returns the Base64-encoded contents of buf. This can later be decoded back to raw bytes
using decode.