pub fn encode<E>(object: &E) -> Vec<u8>
where
    E: Encodable, {
    let mut stream = RlpStream::new();
    stream.append_single_value(object);
    stream.drain()
}
/// Shortcut function to encode structure into rlp.
///
/// ```rust
/// fn main () {
/// 	let animal = "cat";
/// 	let out = rlp::encode(&animal);
/// 	assert_eq!(out, vec![0x83, b'c', b'a', b't']);
/// }
/// ```
Shortcut function to encode structure into rlp.
Shortcut function to encode structure into rlp .
pub fn encode<E>(object: &E) -> Vec<u8>
where
    E: Encodable, {
    let mut stream = RlpStream::new();
    stream.append_single_value(object);
    stream.drain()
}
pub fn encode < E > ( object : & E ) -> Vec < u8 > where E : Encodable , { let mut stream = RlpStream :: new ( ) ; stream . append_single_value ( object ) ; stream . drain ( ) }
Shortcut function to encode structure into rlp.
Shortcut function to encode structure into rlp .
object
&E
object
&E