From 830e7c5d27d161b91402414e6ecd49f1ed818bfb Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 27 Mar 2026 08:48:05 +0100 Subject: Initial commit --- lib/model/content.mli | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/model/content.mli (limited to 'lib/model/content.mli') diff --git a/lib/model/content.mli b/lib/model/content.mli new file mode 100644 index 0000000..ab8d838 --- /dev/null +++ b/lib/model/content.mli @@ -0,0 +1,18 @@ +type 'a t + +val v : string -> 'a Section.t list -> 'a t list -> 'a t +val id : _ t -> string + +val subcontents : 'a t -> 'a t list +(** Return the direct subcontent *) + +val sections : 'a t -> 'a Section.t list + +val parent : 'a t -> 'a t option +(** Get the parent type for an element, if such exists *) + +val root : 'a t -> 'a t +(** Return the root element, which is the content without any parent *) + +val fields : 'a t -> 'a Field.t Seq.t +(** Iterate over the fields in the content *) -- cgit v1.2.3