package capnp-rpc

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

A capability reference to an object that can handle calls. We might not yet know its final location, but we may be able to pipeline messages to it anyway.

inherit base_ref
method call : struct_resolver -> Wire.Request.t -> unit

c#call results msg invokes a method on c's target and eventually resolves results with the answer.

method shortest : cap

c#shortest is the shortest known path to cap. i.e. if c is forwarding to another cap, we return that, recursively.

method when_more_resolved : (cap -> unit) -> unit

c#when_more_resolved fn calls fn x when this cap becomes more resolved. fn x gets a reference to x and needs to dec_ref it. Note that the new capability can be another promise. If c is already resolved to its final value, this does nothing. If c is a far-ref, fn x will be called when it breaks. If c is forwarding to another cap, it will forward this call.

method problem : Capnp_rpc__.Exception.t option

c#problem is the exception for a broken reference, or None if it is not known to be broken.