pub fn encode<T: AsRef<[u8]>>(base: Base, input: T) -> String {
    let input = input.as_ref();
    let mut encoded = base.encode(input.as_ref());
    encoded.insert(0, base.code());
    encoded
}
/// Encode with the given byte slice to base string.
///
/// # Examples
///
/// ```
/// use multibase::{Base, encode};
///
/// assert_eq!(encode(Base::Base58Btc, b"hello"), "zCn8eVZg");
/// ```
Encode with the given byte slice to base string.
Encode with the given byte slice to base string .
pub fn encode<T: AsRef<[u8]>>(base: Base, input: T) -> String {
    let input = input.as_ref();
    let mut encoded = base.encode(input.as_ref());
    encoded.insert(0, base.code());
    encoded
}
pub fn encode < T : AsRef < [ u8 ] > > ( base : Base , input : T ) -> String { let input = input . as_ref ( ) ; let mut encoded = base . encode ( input . as_ref ( ) ) ; encoded . insert ( 0 , base . code ( ) ) ; encoded }
Encode with the given byte slice to base string.
Encode with the given byte slice to base string .
base
Base
input
T
base
Base
input
T
examples
```
use multibase::{Base, encode}.


` ` ` use multibase :: { Base encode } .