package serde

  1. Overview
  2. Docs
A serialization framework for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

serde-0.0.1.tbz
sha256=14c12871e403a531994acc99ca9d140ea00ea4f6a794d38f01f606eb33615dbd
sha512=fea87f5067ed2c27b76dcb0ff96c6d39c939f62aecced8cd19790e20af794fbfaa99d727c04461e42ab115c97f39d0fe68f93f016ed2cb1471d8cc0d55b19b10

doc/src/serde.de/variant_access.ml.html

Source file variant_access.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
open Intf

type ('tag, 'value, 'error) t = ('tag, 'value, 'error) variant_access = {
  tag : unit -> ('tag, 'error Error.de_error) result;
  unit_variant : unit -> (unit, 'error Error.de_error) result;
  tuple_variant :
    (module Rec.Visitor_intf with type value = 'value) ->
    ('value, 'error Error.de_error) result;
  record_variant :
    'field.
    (module Rec.Visitor_intf with type value = 'value and type tag = 'field) ->
    (module Rec.Visitor_intf with type value = 'field) ->
    fields:string list ->
    ('value, 'error Error.de_error) result;
}

let tag t = t.tag ()
let unit_variant t = t.unit_variant ()
let tuple_variant t v = t.tuple_variant v
let record_variant t v = t.record_variant v
OCaml

Innovation. Community. Security.