Function rlp::encode[][src]

pub fn encode<E>(object: &E) -> BytesMut where
    E: Encodable
Expand description

Shortcut function to encode structure into rlp.

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