Skip to content

Commit

Permalink
Add interface file for Rpc_std_helpers module
Browse files Browse the repository at this point in the history
This is cherry-picked from 8f970ce

Signed-off-by: Gabor Igloi <[email protected]>
  • Loading branch information
gaborigloi committed Apr 25, 2017
1 parent 05e9154 commit b713ae0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ocaml/xapi/rpc_std_helpers.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
(** Helpers to marshal and unmarshal Rpc.Dict into Hashtbl *)

let rpc_of_hashtbl ~rpc_of t =
let dict = Hashtbl.fold (fun k v acc -> (k, rpc_of v) :: acc) t [] in
Rpc.Dict dict
Expand Down
5 changes: 5 additions & 0 deletions ocaml/xapi/rpc_std_helpers.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(** Helpers to marshal and unmarshal Rpc.Dict into Hashtbl *)

val rpc_of_hashtbl : rpc_of:('a -> Rpc.t) -> (string, 'a) Hashtbl.t -> Rpc.t

val hashtbl_of_rpc : of_rpc:(Rpc.t -> 'a) -> Rpc.t -> (string, 'a) Hashtbl.t

0 comments on commit b713ae0

Please sign in to comment.