Function encode
Source pub fn encode(data: impl AsRef<[u8]>) -> String
Expand description
Encodes data using the default settings.
The data can then be decoded using decode.
ยงExamples
let encoded = bunk::encode(b"aftersun");
let decoded = bunk::decode(encoded)?;
assert_eq!(decoded, b"aftersun");