package bonsai
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303
doc/bonsai.web/Bonsai_web/Rpc_effect/Private/index.html
Module Rpc_effect.Private
Source
This module contains functions intended for use by Bonsai's internal startup code. Ordinarily, you shouldn't need to call any of them.
More specifically, in tests, with_connector
is called when a test handle is created, using an optional, user-provided function to select the connector. Similarly, when an app is actually being run, we take a function of type Custom.t -> Connector.t
and default the Self
and Url
cases to self_connector
and url_connector
declared below.
val with_connector :
(Where_to_connect.t -> Connector.t) ->
'a Bonsai.For_open.Computation.t ->
'a Bonsai.For_open.Computation.t
Turns a computation into a new computation that has access to some sort of connection. This is the primitive and most powerful way of providing access to a connection. Since it has access to the Where_to_connect.t
, it can create different kinds of connections based on what is being connected to.
The connector for the server hosting the web page.
The connector for an arbitrary URL.
Determines whether the connector is the test fallback connector. This is used by the testing library to swap out the test_fallback
connector with a different connector controlled by other parameters.