Bonsai_drivermodule Incr = Ui_incrmodule Instrumentation : sig ... endval create :
here:lexing_position ->
?optimize:bool ->
instrumentation:
(Instrumentation.Timeable_event.t, _)
Bonsai.Private.Instrumentation.Config.t ->
time_source:Bonsai.Time_source.t ->
(Bonsai.graph @ local -> 'r Bonsai.t) ->
'r tBuilds a new driver for a bonsai component.
The "main loop" of a bonsai handle is 1. flush - dequeue events and process actions 2. result - compute the final value of the computation 3. trigger_lifecycles - run any lifecycle events for this stabilization
val flush :
?log_before_action_application:(action_sexp:Core.Sexp.t Core.Lazy.t -> unit) ->
?log_on_skipped_stabilization:(action_sexp:Core.Sexp.t Core.Lazy.t -> unit) ->
'a t ->
unitApply all pending actions and stabilize the incremental graph, updating result.
val result : 'r t -> 'rretrieves the computed result of the bonsai application
val trigger_lifecycles : _ t -> unitTriggers all lifecycle events that need to be run. Lifecycle events are run in this order: 1. component deactivations 2. component activations 3. after display, which includes things like on_change
val schedule_event : _ t -> unit Ui_effect.t -> unitSchedules an event
val has_before_display_events : _ t -> boolreturns true if the lifecycle collection has anything that it wants to do before the display is processed.
val has_after_display_events : _ t -> boolreturns true if the lifecycle collection has anything that it wants to do after the display is processed.
module Expert : sig ... endmodule For_testing : sig ... end