Codec
module Codec| Assembly | Ranvier.Wire |
| Attributes | [<RequireQualifiedAccess>] |
Functions and values
case<'t, 'v> (tag: string) (caseConstructor: 't -> 'v) (caseCodec: Codec<'t>) : VariantCase<('t -> VariantEncoding -> IEncodable),'v>
case<'t, 'v> (tag: string) (caseConstructor: 't -> 'v) (caseCodec: Codec<'t>) : VariantCase<('t -> VariantEncoding -> IEncodable),'v>A case of a variantCodec block: the tag it is written under, its constructor, and the codec for its fields.
A case with several fields takes a tuple codec, in the order the fields are declared. A case with none takes Codec.unit.