summaryrefslogtreecommitdiff
path: root/lib/model/content.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-03-27 08:48:05 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-03-27 08:48:05 +0100
commit830e7c5d27d161b91402414e6ecd49f1ed818bfb (patch)
tree448864635d29b1ea66424cbb9e0816fbcf1e1907 /lib/model/content.mli
Initial commit
Diffstat (limited to 'lib/model/content.mli')
-rw-r--r--lib/model/content.mli18
1 files changed, 18 insertions, 0 deletions
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 *)