Module Expert.Dependency
type ('a, 'w) t
A
t
represents the edge from a child incremental to a parent expert node. At
is stateful, you cannot use the samet
to link one child node to multiple parents at the same time.
val 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.t
val create : ?on_change:('a -> unit) -> ('a, 'w) incremental -> ('a, 'w) t
When calling
create ?on_change child
, nothing happens until thet
is linked to a parent. seeNode.add_dependency
for documentation ofon_change
.
val value : ('a, _) t -> 'a
value t
reads the value of the child incremental. It can only be used from the callback of theExpert.Node.t
that hast
in its set of dependencies.