package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=c78c4476ee6b856846e2d0941e5965009d5e1b853e564b2b1bee61202f0b1ebb

doc/bonsai.web/Bonsai_web/Rpc_effect/Poll_result/index.html

Module Rpc_effect.Poll_resultSource

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

Sourcetype ('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;
}
Sourceval sexp_of_t : ('query -> Sexplib0.Sexp.t) -> ('response -> Sexplib0.Sexp.t) -> ('query, 'response) t -> Sexplib0.Sexp.t