package capnp-rpc-lwt

  1. Overview
  2. Docs
module Id : sig ... end

Resolutions

type resolution

Internally, this is just ('a Capability.t, Capnp_rpc.Exception.t) result but the types work out better having it abstract.

val grant : 'a Capability.t -> resolution

grant x is Ok x.

reject x is Error x.

val unknown_service_id : resolution

unknown_service_id is a standard rejection message.

Restorers

type t

A restorer looks up live capabilities from service IDs.

val none : t

none is a restorer that rejects everything.

val single : Id.t -> 'a Capability.t -> t

single id cap is a restorer that responds to id with cap and rejects everything else.

module type LOADER = sig ... end
module Table : sig ... end
val of_table : Table.t -> t

restore t id restores id using t. You don't normally need to call this directly, as the Vat will do it automatically.

OCaml

Innovation. Community. Security.