secunit_core/wisp/doc.rs
1//! The backend-neutral assembled document.
2
3use serde::Serialize;
4
5use super::Status;
6
7/// Document metadata exposed to the partials as `ctx` (see docs ยง9). Field
8/// names match the keys the bundled Typst partials read.
9#[derive(Debug, Clone, Serialize)]
10pub struct WispMeta {
11 pub org: String,
12 pub title: String,
13 pub version: String,
14 pub effective_date: String,
15 pub classification: String,
16 pub status: Status,
17 /// Path to the logo *within the template directory* (e.g. `logo.svg`).
18 pub logo: String,
19 pub commit: String,
20 pub content_hash: String,
21 pub generated_at: String,
22}
23
24/// The assembled WISP: metadata plus the concatenated markdown body and the
25/// list of source files that produced it (in assembly order).
26#[derive(Debug, Clone)]
27pub struct WispDoc {
28 pub meta: WispMeta,
29 /// The concatenated markdown for the whole document.
30 pub body_markdown: String,
31 /// Source files assembled, in order (relative to the source root).
32 pub sections: Vec<String>,
33}