ppx_deriving_rpc
ppx extension for rpclib
Description
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]
Install
copied = false, 2000)"
:class="{ 'border-gray-700': !copied, 'text-gray-100': !copied, 'focus:ring-orange-500': !copied, 'focus:border-orange-500': !copied, 'border-green-600': copied, 'text-green-600': copied, 'focus:ring-green-500': copied, 'focus:border-green-500': copied }">
- Published
- 03 Dec 2019
- Authors
- Maintainers
Sources
Dependencies
alcotest
with-test
async
with-test & < "v0.13"
lwt
with-test & >= "3.0.0"
rpclib-async
with-test & = version
rpclib-lwt
with-test & = version
ppxlib
< "0.9.0"
rpclib
= version
jbuilder
>= "1.0+beta7"
ocaml
>= "4.03.0" & < "4.10.0"
Reverse Dependencies