nahpu_export 0.5.0

A utility crate for exporting NAHPU project data into documents (Markdown, Typst, PDF).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Document export errors.

/// Error returned while parsing, rendering, or compiling a document.
#[derive(Debug, thiserror::Error)]
pub enum ExportError {
    /// Serialized document records could not be decoded.
    #[error("failed to parse document JSON: {0}")]
    InvalidJson(#[from] serde_json::Error),
    /// Typst source could not be compiled.
    #[error("Typst compilation failed: {0}")]
    TypstCompilation(String),
    /// A compiled Typst document could not be encoded as PDF.
    #[error("PDF generation failed: {0}")]
    PdfGeneration(String),
}