ses-pdf 0.2.0

Professional PDF report engine for structural engineering calculations and drawing sheets — equations, tables, charts, Arch sizes, and title blocks via Typst.
Documentation
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Heading {
    pub text: String,
    pub level: HeadingLevel,
}

#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize)]
pub enum HeadingLevel {
    #[default]
    H1,
    H2,
    H3,
}

impl HeadingLevel {
    pub(crate) fn typst_prefix(self) -> &'static str {
        match self {
            Self::H1 => "=",
            Self::H2 => "==",
            Self::H3 => "===",
        }
    }
}