Skip to main content

try_encode_to_vec

Function try_encode_to_vec 

Source
pub fn try_encode_to_vec<T: Encode + ?Sized>(
    value: &T,
) -> Result<Vec<u8>, EncoderError>
Expand description

Encodes value as an outermost value, reporting values that have no encoding.

The only typed values without an encoding are collections with more than i32::MAX elements and HLAextendableVariantRecord alternatives longer than u32::MAX octets.