encode_vec

Function encode_vec 

Source
pub fn encode_vec<E: Encode + ?Sized>(
    e: &E,
) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>
Expand description

Encode an encodable type into a vector.

Writing into a vector cannot cause an IO error and therefore this method returns only custom errors raised via the EncodeError::Custom variant.