pub fn codec_from_config_with_id<'de, T: DynCodecType, D: Deserializer<'de>>(
ty: &T,
config: D,
) -> Result<T::Codec, D::Error>
Expand description
Utility function to instantiate a codec of the given ty
, where the
config
may still contain an id
field.
If the config
does not contain an id
field, use
DynCodecType::codec_from_config
instead.
ยงErrors
Errors if constructing the codec fails.