package capnp-rpc

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

This module defines the information in the messages that goes over the wire in one direction. The types are from the point of view of the sender, as in the Cap'n Proto RPC specification.

Parameters

module T : TABLE_TYPES

Signature

include module type of struct include T end
module QuestionId = T.QuestionId
module AnswerId = T.AnswerId
module ImportId = T.ImportId
module ExportId = T.ExportId
type third_party_desc = Network.third_party_cap_id * ExportId.t
type message_target = [
  1. | `ReceiverHosted of ImportId.t
  2. | `ReceiverAnswer of QuestionId.t * Core_types.Wire.Path.t
]
type desc = [
  1. | message_target
  2. | `None
  3. | `SenderHosted of ExportId.t
  4. | `SenderPromise of ExportId.t
  5. | `ThirdPartyHosted of third_party_desc
]
val pp_desc : Format.formatter -> [< `Local of < pp : Format.formatter -> unit.. > | `None | `ReceiverAnswer of QuestionId.t * Core_types.Wire.Path.t | `ReceiverHosted of ImportId.t | `SenderHosted of ExportId.t | `SenderPromise of ExportId.t | `ThirdPartyHosted of 'a ] -> unit
type send_results_to = [
  1. | `Caller
  2. | `Yourself
  3. | `ThirdParty of Network.recipient_id
]
type return = [
  1. | Error.t
  2. | `Results of Core_types.Wire.Response.t * desc RO_array.t
  3. | `ResultsSentElsewhere
  4. | `TakeFromOtherQuestion of QuestionId.t
  5. | `AcceptFromThirdParty
]
type disembargo_request = [
  1. | `Loopback of message_target * EmbargoId.t
]
val pp_return : Format.formatter -> [< `AcceptFromThirdParty | `Cancelled | `Exception of Exception.t | `Results of 'a * [< `Local of < pp : Format.formatter -> unit.. > | `None | `ReceiverAnswer of QuestionId.t * Core_types.Wire.Path.t | `ReceiverHosted of ImportId.t | `SenderHosted of ExportId.t | `SenderPromise of ExportId.t | `ThirdPartyHosted of 'b ] RO_array.t | `ResultsSentElsewhere | `TakeFromOtherQuestion of QuestionId.t ] -> unit
val pp_disembargo_request : disembargo_request Fmt.t
type t = [
  1. | `Abort of Exception.t
  2. | `Bootstrap of QuestionId.t * string
  3. | `Call of QuestionId.t * message_target * Core_types.Wire.Request.t * desc RO_array.t * send_results_to
  4. | `Finish of QuestionId.t * bool
  5. | `Release of ImportId.t * int
  6. | `Disembargo_request of disembargo_request
  7. | `Disembargo_reply of message_target * EmbargoId.t
  8. | `Return of AnswerId.t * return * bool
  9. | `Resolve of ExportId.t * (desc, Exception.t) Pervasives.result
]

A message sent over the network.

val with_qid_tag : Logs.Tag.set -> t -> Logs.Tag.set
val pp_results_to : Format.formatter -> [< `Caller | `ThirdParty of 'a | `Yourself ] -> unit
val pp_recv : (Format.formatter -> Core_types.Wire.Request.t -> unit) -> t Fmt.t

Describe message from the point of view of the receiver.