numcodecs

Function serialize_codec_config_with_id

Source
pub fn serialize_codec_config_with_id<T: Serialize, C: DynCodec, S: Serializer>(
    config: &T,
    codec: &C,
    serializer: S,
) -> Result<S::Ok, S::Error>
Expand description

Utility function to serialize a codec’s config together with its DynCodecType::codec_id.

This function may be useful when implementing the DynCodec::get_config method.

§Errors

Errors if serializing the codec configuration fails.