Capnp_rpc_lwt.Sturdy_refSourceAn off-line (persistent) capability reference.
A sturdy ref contains all the information necessary to get a live reference to a service:
connect t returns a live reference to t's service.
connect_exn is a wrapper for connect that returns a failed Lwt thread on error.
val with_cap :
'a t ->
('a Capability.t ->
('b, [> `Capnp of Capnp_rpc.Exception.t ] as 'e) Lwt_result.t) ->
('b, 'e) Lwt_result.twith_cap t f uses connect t to get a live-ref x, then does Capability.with_ref x f.
with_cap_exn t f uses connect_exn t to get a live-ref x, then does Capability.with_ref x f.
val reader :
('a StructStorage.reader_t -> Capnp.MessageSig.ro Slice.t option) ->
'a StructStorage.reader_t ->
Uri.treader accessor is a field accessor for reading a sturdy ref. e.g. if sr_get is a generated field accessor for an AnyPointer field, then reader Reader.Struct.sr_get is an accessor that treats it as a SturdyRef field. todo: This should really return a sturdy ref, not a URI, but that requires a change to the spec to add a sturdy ref cap-descriptor table entry type.
val builder :
('a StructStorage.builder_t -> Capnp.MessageSig.rw Slice.t) ->
'a StructStorage.builder_t ->
_ t ->
unitbuilder setter converts a generated AnyPointer field setter setter to a SturdyRef setter. Use it to add a SturdyRef to a message with builder Params.sr_get params sr.