package capnp-rpc

  1. Overview
  2. Docs
Module type
Class type

A struct_resolver can be used to resolve some promise.

method pp : Format.formatter -> unit
method resolve : struct_ref -> unit

r#resolve x causes r's promise to behave as x in future. The promise takes ownership of x (is responsible for calling dec_rec on it).

method sealed_dispatch : 'a. 'a Capnp_rpc__.S.brand -> 'a option

r#sealed_dispatch brand extracts some private data of the given type.

method set_blocker : base_ref -> (unit, [> `Cycle ]) Pervasives.result

r#set_blocker b means that resolve won't be called until b is resolved. r's promise should report this as its blocker. This is needed to detect cycles. When the blocker is resolved, call this again with None to clear it (the promise will then report itself as the blocker again, until resolved).

method clear_blocker : unit

r#clear_blocker removes the blocker set by set_blocker. r is then blocked by itself, if unresolved.


Innovation. Community. Security.