Function tetsy_rlp::encode[][src]

pub fn encode<E>(object: &E) -> Vec<u8> where
    E: Encodable

Shortcut function to encode structure into rlp.

let animal = "cat";
let out = tetsy_rlp::encode(&animal);
assert_eq!(out, vec![0x83, b'c', b'a', b't']);