pub fn to_vec<T>(x: T) -> Result<Vec<u8>, Error<Infallible>>where T: Encode<()>,
Encode a type implementing Encode and return the encoded byte vector.
Encode
Requires feature "alloc".
"alloc"