Incremental.Observerval sexp_of_t :
('a -> Ppx_sexp_conv_lib.Sexp.t) ->
('w -> Ppx_sexp_conv_lib.Sexp.t) ->
('a, 'w) t ->
Ppx_sexp_conv_lib.Sexp.tinclude Core_kernel.Invariant.S2 with type ('a, 'b) t := ('a, 'b) tval invariant : ('a -> unit) -> ('b -> unit) -> ('a, 'b) t -> unitval use_is_allowed : (_, _) t -> boolval value : ('a, _) t -> 'a Core_kernel.Or_error.tvalue t returns the current value of t, or Error if t does not currently have a stable value. In particular, value t will return Error in the following situations:
stabilize has not been called since t was created.disallow_future_use t has been called.observing t is invalid.Rather than using value in a function that runs during stabilization, one should use map or bind to express the dependence of an incremental computation on an incremental.
val value_exn : ('a, _) t -> 'amodule Update : sig ... endon_update_exn t ~f calls f after the current stabilization and after each subsequent stabilization in which t changes, until disallow_future_use t is called. f will be called at most once per stabilization. Here is a state diagram for the allowable sequences of Update.t's that can be supplied to a particular f:
/-----------------------------------------------------\
| / |
| | v
Start ------> Initialized ------> Changed ------> Invalidated
^ |
\--/on_update_exn raises if disallow_future_use t was previously called.
val disallow_future_use : (_, _) t -> unitdisallow_future_use t causes all future attempts to use t to fail and on_update_exn handlers added to t to never run again. It also causes incremental to treat t as unobserved, and thus stabilize will not maintain the value of t or any of t's descendants that are needed only to maintain t. disallow_future_use raises if called during stabilization.