package bonsai

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

Module Bonsai_test.HandleSource

Sourcetype ('result, 'incoming) t
Sourceval show : (_, _) t -> unit

show prints out the result of the component as specified by the Result_spec that was passed into Handle.create.

Sourceval show_diff : ?location_style:Patdiff_kernel.Format.Location_style.t -> (_, _) t -> unit

show_diff will print the diff of the view between now and the last time that show or show_diff was called.

Sourceval recompute_view : (_, _) t -> unit

recompute_view is like show, but it doesn't print anything. Calling recompute_view between invocations of show_diff does not affect the diff the gets shown.

Sourceval recompute_view_until_stable : ?max_computes:int -> (_, _) t -> unit

This function calls recompute_view until either max_computes is reached (defaults to 100), or there are no more after-display lifecycle events for processing.

This can be useful when using e.g. Bonsai.Edge.on_change, which might otherwise delay their effects until the next frame.

Sourceval store_view : (_, _) t -> unit

store_view is like show except that instead of printing the view to stdout, it only stores the current view for use with show_diff. This can be useful if you want to print the diff of "before->after" without being required to print the entirety of "before".

Sourceval flush : (_, _) t -> unit

Flushes all the events in the event queue. This can be useful if e.g. you are completing an Effect synchronously via Svar, and don't want to go through the other functions which flush (like show)

Sourceval result : ('result, _) t -> 'result
Sourceval do_actions : (_, 'incoming) t -> 'incoming list -> unit
Sourceval disable_bonsai_path_censoring : (_, _) t -> unit
Sourceval disable_bonsai_hash_censoring : (_, _) t -> unit
Sourceval clock : (_, _) t -> Bonsai_test__.Import.Incr.Clock.t
Sourceval advance_clock_by : (_, _) t -> Core.Time_ns.Span.t -> unit
Sourceval create : (module Bonsai_test__.Proc.Result_spec.S with type incoming = 'incoming and type t = 'result) -> ?clock:Bonsai_test__.Import.Incr.Clock.t -> 'result Bonsai.Computation.t -> ('result, 'incoming) t
Sourceval show_model : (_, _) t -> unit
  • alert rampantly_nondeterministic This function exposes Bonsai internals that may change without warning
Sourceval result_incr : ('r, 'i) t -> 'r Bonsai_test__.Import.Incr.t
Sourceval lifecycle_incr : (_, _) t -> Bonsai_test__.Import.Incr.Packed.t
Sourceval apply_action_incr : (_, _) t -> Bonsai_test__.Import.Incr.Packed.t
OCaml

Innovation. Community. Security.