package capnp-rpc-net

  1. Overview
  2. Docs

Module Capnp_rpc_net.RestorerSource

Sourcemodule Id : sig ... end

Resolutions

Sourcetype resolution

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

grant x is Ok x.

Sourceval reject : Capnp_rpc.Exception.t -> resolution

reject x is Error x.

Sourceval unknown_service_id : resolution

unknown_service_id is a standard rejection message.

Restorers

Sourcetype t

A restorer looks up live capabilities from service IDs.

Sourceval none : t

none is a restorer that rejects everything.

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

Sourcemodule type LOADER = sig ... end
Sourcemodule Table : sig ... end
Sourceval of_table : Table.t -> t
Sourceval restore : t -> Id.t -> ('a Capnp_rpc_lwt.Capability.t, Capnp_rpc.Exception.t) result Lwt.t

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