Skip to content

Commit b713ae0

Browse files
committed
Add interface file for Rpc_std_helpers module
This is cherry-picked from 8f970ce Signed-off-by: Gabor Igloi <[email protected]>
1 parent 05e9154 commit b713ae0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ocaml/xapi/rpc_std_helpers.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
(** Helpers to marshal and unmarshal Rpc.Dict into Hashtbl *)
2-
31
let rpc_of_hashtbl ~rpc_of t =
42
let dict = Hashtbl.fold (fun k v acc -> (k, rpc_of v) :: acc) t [] in
53
Rpc.Dict dict

ocaml/xapi/rpc_std_helpers.mli

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(** Helpers to marshal and unmarshal Rpc.Dict into Hashtbl *)
2+
3+
val rpc_of_hashtbl : rpc_of:('a -> Rpc.t) -> (string, 'a) Hashtbl.t -> Rpc.t
4+
5+
val hashtbl_of_rpc : of_rpc:(Rpc.t -> 'a) -> Rpc.t -> (string, 'a) Hashtbl.t

0 commit comments

Comments
 (0)