pub fn encode<T>(input: T) -> StringExpand description
Encode the input into a base64 string using the standard base64 encoding scheme.
§Arguments
input- The input data to encode, which can be any type that implementsAsRef<[u8]>.
§Returns
A String containing the base64 encoded representation of the input data.
§Examples
let data = b"Hello, world!";
let encoded = base64::encode(data);
assert_eq!(encoded, "SGVsbG8sIHdvcmxkIQ==");