Function mnemonic::decode

source ·
pub fn decode<S, W>(src: S, dest: W) -> Result<usize>where
    S: AsRef<[u8]>,
    W: Write,
Expand description

Decode the mnemonic string src into bytes, and write the bytes to dest.

Example

let src = "digital-apollo-aroma--rival-artist-rebel";

let mut dest = Vec::<u8>::new();
mnemonic::decode(src, &mut dest).unwrap();

assert_eq!(dest, [101, 2, 240, 6, 108, 11, 20, 97]);