summaryrefslogtreecommitdiff
path: root/lib/model/content.mli
blob: ab8d83856434b2f53e7f7a560e214c18a5383941 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 *)