package capnp-rpc

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Capnp_rpc.ServiceSource

Functions for service implementors.

Sourcetype ('a, 'b) method_t = 'a -> (unit -> unit) -> 'b StructRef.t

An ('a, 'b) method_t is a method implementation that takes a reader for the parameters and a function to release the capabilities in the parameters, and returns a promise for the results.

Sourcemodule Response : sig ... end
Sourceval return : 'a Response.t -> 'a StructRef.t

return r wraps up a simple local result as a promise.

Sourceval return_empty : unit -> 'a StructRef.t

return_empty () is a promise for a response with no payload.

Sourceval error : Error.t -> 'a StructRef.t

error e is a broken promise for a struct, with error e.

Sourceval fail : ?ty:Exception.ty -> ('a, Format.formatter, unit, 'b StructRef.t) format4 -> 'a

fail msg is an exception error with reason msg.

OCaml

Innovation. Community. Security.