module Flat: sig
.. end
A “flat” representation of the state (the “normal”
representation can be very deep hierarchy, that clients running on
weak VMs, like Javascript engines, cannot handle)i.
type
state = Ketrew_pure.Target.State.t
type
item = private {
}
val item_to_yojson : item -> Yojson.Safe.json
val item_of_yojson : Yojson.Safe.json ->
[ `Error of string | `Ok of item ]
val time : item -> float
val simple : item -> Ketrew_pure.Target.State.simple
val name : item -> string
val message : item -> string option
val more_info : item -> string list
val finished : item -> bool
type
t = private {
}
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json ->
[ `Error of string | `Ok of t ]
val empty : unit -> t
val of_state : state -> t
val history : t -> item list
val latest : t -> item option
Get the most recent item.
val since : t ->
float -> t option
Filter the history with a date, returning a flat-state
containing only newer items if any.
val merge : t ->
t -> t
Merge two flat states into a sorted new one.