ppx_deriving_rpcversion
ppx extension for rpclib
The library provides the [@@deriving rpc]
ppx directly
generates the conversion functions.
type t = ... [@@deriving rpc]
will give two functions:
A function to convert values of type
t
to values of typeRpc.t
:val rpc_of_t : t -> Rpc.t
A function to convert values of type
Rpc.t
to values of typet
:val t_of_rpc : Rpc.t -> (t,string) Result.result
It also supports the @key
annotations for having different field names:
type t = { foo: int [@key "type"]; bar: int [@key "let"]; } [@@deriving rpc]
Tags | org:mirage org:xapi-project |
---|---|
Author | Thomas Gazagnaire, Jon Ludlam |
Published | |
Homepage | https://github.com/mirage/ocaml-rpc |
Issue Tracker | https://github.com/mirage/ocaml-rpc/issues |
Maintainer | thomas@gazagnaire.org |
Dependencies |
|
Source [http] | https://github.com/mirage/ocaml-rpc/archive/v5.9.0.tar.gz sha256=06e3798dd900c1356c4080e91587e96c98f49b0bb4068fbbb53eb4f52c169f97 md5=177db71621a7aa7a55cbea6c237eb6dc |
Edit | https://github.com/ocaml/opam-repository/tree/master/packages/ppx_deriving_rpc/ppx_deriving_rpc.5.9.0/opam |
Required by
- crc>=2.1.0
- rpc=5.9.0
- xapi-backtrace>=0.7
- xapi-rrd=1.8.2