package orsetto
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=81283687ce3204263bc955a332dd7b90bf5b648a990c01160f33aaa77d80962f
md5=7346293aa013c2a8974c6fb7c521166a
doc/orsetto.cbor/Cbor_decode/Annot/Meta/index.html
Module Annot.Meta
A submodule to facilitate structural interchange of metadata.
The ~style and ~fields parameters for all the functions below are used as described in Meta to control what fields are encoded in a position and how they are to be decoded.
All the of_opaque_xxxxx function raise Cf_type.Type_error if the type of v is not witnessed correctly for the style and fields specified. Otherwise, raises Failure if the encapsulated value is witnessed by the correct type, but the encoded value is not a valid representation of a position.
val of_opaque_iota :
?style:[< Cf_annot.Meta.style ] ->
?fields:fields list ->
(Cf_type.opaque -> Cbor_event.t) ->
Cf_type.opaque ->
iotaUse of_opaque_iota f v to translate v into an iota value provided it was decoded from an interchange language representation of it produced by to_opaque_iota below. Applies f to the symbol encapsulated in v to compose the result.
val of_opaque_span :
?style:[< Cf_annot.Meta.style ] ->
?fields:fields list ->
Cf_type.opaque ->
spanUse of_opaque_span v to translate v into a span value provided it was decoded from an interchange language representation of it produced by to_opaque_span below.
val of_opaque_form :
?style:[< Cf_annot.Meta.style ] ->
?fields:fields list ->
(Cf_type.opaque -> 'a) ->
Cf_type.opaque ->
'a formUse of_opaque_form f v to translate v into a form value provided it was decoded from an interchange language representation of it produced by to_opaque_form below. The value encapsulated in the form is unpacked by applying v.
val to_opaque_iota :
?style:[< Cf_annot.Meta.style ] ->
?fields:fields list ->
(Cbor_event.t -> Cf_type.opaque) ->
iota ->
Cf_type.opaqueUse to_opaque_iota f i to translate i into an opaque value ready to encode in an interchange language. The symbol encapsulated by in the iota is packed by applying f.
val to_opaque_span :
?style:[< Cf_annot.Meta.style ] ->
?fields:fields list ->
span ->
Cf_type.opaqueUse to_opaque_span s to translate s into an opaque value ready to encode in an interchange language.
val to_opaque_form :
?style:[< Cf_annot.Meta.style ] ->
?fields:fields list ->
('a -> Cf_type.opaque) ->
'a form ->
Cf_type.opaqueUse to_opaque_form f loc to translate loc into an opaque value ready to encode in an interchange language. The value encapsulated in the form is packed by applying f.