mecfs_bio.build_system.task.typst_source
A Typst diagram source: exactly one of a committed .typ file path or an inline string of Typst code.
Classes:
-
TypstSource–Holds exactly one of a path to a .typ file or a literal string of Typst
TypstSource
Holds exactly one of a path to a .typ file or a literal string of Typst code. Enforcing exactly-one at construction makes the invalid states (both set, neither set, missing file) unrepresentable.
Methods:
-
resolve_to_path–Return a concrete .typ path for the source. For the path variant this is
Attributes:
resolve_to_path
Return a concrete .typ path for the source. For the path variant this is the existing file; for the code variant the string is written into scratch_dir and that new path is returned.