Function libipld::cid::multibase::decode

source ·
pub fn decode<T>(input: T) -> Result<(Base, Vec<u8>), Error>
where T: AsRef<str>,
Expand description

Decode the base string.

§Examples

use multibase::{Base, decode};

assert_eq!(
    decode("zCn8eVZg").unwrap(),
    (Base::Base58Btc, b"hello".to_vec())
);