package bonsai

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

The various rpc polling functions in this module return a Poll_result.t, containing the current state and some historical state of the RPC.

last_ok_response contains the most recent query/response pair that completed successfully, even if the RPC has returned errors since then.

last_error contains the most recent query that produced an error, alongside the error that was returned. Unlike last_ok_response, this field is set to None as soon a response completes sucessfully.

inflight_query is Some when an a query has been dispatched, but has not completed yet.

refresh can be used to manually redispatch the rpc

type ('query, 'response) t = {
  1. last_ok_response : ('query * 'response) option;
  2. last_error : ('query * Core.Error.t) option;
  3. inflight_query : 'query option;
  4. refresh : unit Bonsai.For_open.Effect.t;
}
val sexp_of_t : ('query -> Sexplib0.Sexp.t) -> ('response -> Sexplib0.Sexp.t) -> ('query, 'response) t -> Sexplib0.Sexp.t
OCaml

Innovation. Community. Security.