Function data_encoding::encode::encode [] [src]

pub fn encode<B: Base>(base: &B, input: &[u8]) -> String

Generic encoding function with allocation.

This function is a wrapper for encode_mut that allocates an output of the correct size using encode_len.

Correctness

The base must satisfy the Base invariants.

Panics

May panic if base does not satisfy the Base invariants.