Hcs.Codec.With_codec
hcs · API reference
Parameters
module C : CODECSignature
val encode_body : 'a C.encoder -> 'a -> (string, codec_error) resultEncode a value to a string body.
val decode_body : 'a C.decoder -> string -> ('a, codec_error) resultDecode a string body.
val encode : 'a C.encoder -> 'a -> (Cstruct.t, codec_error) resultEncode a value to a Cstruct.t.
val decode : 'a C.decoder -> Cstruct.t -> ('a, codec_error) resultDecode a Cstruct.t.
val content_type : stringThe codec content type.