Trait ToTypst
Source pub trait ToTypst {
// Required method
fn to_typst(&self) -> String;
}
Expand description
Convert a Rust value to Typst source code.
§Example
ⓘuse typst_batch::codegen::ToTypst;
assert_eq!("hello".to_typst(), r#""hello""#);
assert_eq!(42i64.to_typst(), "42");
assert_eq!(true.to_typst(), "true");
Generate Typst source code representation.