package bonsai

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

Install

Dune Dependency

Authors

Maintainers

Sources

bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303

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
OCaml

Innovation. Community. Security.