to_bytes

Function to_bytes 

Source
pub fn to_bytes<T, C: Any>(
    value: &T,
    ctx: &C,
) -> Result<Vec<u8>, SerializeError>
where T: for<'a> Serialize<Serializer<'a>>,
Expand description

Transform struct to bytes

This function implementation refers to rkyv::to_bytes and add custom error and context support