Module Brr_css.Highlight_registry

HighlightRegistry objects.

type t

The type for HighlightRegistry objects.

val size : t -> int

size r is the size of r.

val has : t -> Jstr.t -> bool

has r n is true if r has a highlight for the name n.

val get : t -> Jstr.t -> Highlight.t option

get r n gets the highlight registered with n, if any.

val set : t -> Jstr.t -> Highlight.t -> unit

set r n h sets the entry named n to highlight h.

val delete : t -> Jstr.t -> bool

delete r n deletes the entry named by n and returns true if there was such an entry and false otherwise.

val clear : t -> unit

clear r removes all entries.

val fold : (Jstr.t -> Highlight.t -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f r acc folds f over the entries of r starting with acc.