mte/unikernel/duniverse/dune_/otherlibs/dune-rpc/private/sub.ml
2025-11-11 02:07:51 +01:00

14 lines
280 B
OCaml

open Types
type 'a t =
{ poll : (Id.t, 'a option) Decl.Request.witness
; cancel : Id.t Decl.Notification.witness
}
let of_procedure p =
let open Procedures.Poll in
{ poll = (poll p).decl; cancel = (cancel p).decl }
;;
let poll t = t.poll
let poll_cancel t = t.cancel