Expand description
Typst code generation and type conversion.
Provides bidirectional conversion between Rust/JSON and Typst types.
§Modules
- [
serialize] - Typst → JSON conversion - [
deserialize] - JSON → Typst conversion - [
lookup] - Function lookup utilities - [
source] - Rust → Typst source code generation - [
builder] - Dict/Array construction helpers - [
inputs] - sys.inputs builder from JSON - [
error] - Error types
Structs§
- Dict
Builder - Builder for Typst dictionary literals.
- Inputs
- Opaque inputs type for
sys.inputsinjection.
Enums§
- Convert
Error - Error during JSON to Typst conversion.
Traits§
- ToTypst
- Convert a Rust value to Typst source code.
Functions§
- array
- Build a Typst array from items.
- array_
raw - Build a Typst array from raw code items.
- content_
to_ json - Serialize Content to JSON.
- dict
- Build a Typst dictionary from entries.
- dict_
raw - Build a Typst dictionary from raw code entries.
- dict_
sparse - Build a Typst dictionary with optional values.
- format_
array - Format items as Typst array literal.
- json_
to_ content - Convert JSON to Typst Content.
- json_
to_ simple_ text - Simplify JSON by extracting text from Content objects.
- json_
to_ simple_ value - Convert JSON value to Typst Value (simple, without Content reconstruction).
- json_
to_ value - Convert JSON to Typst Value.
- parse_
angle - Parse an angle literal.
- parse_
color - Parse a color literal.
- parse_
length - Parse a length literal.
- parse_
ratio - Parse a ratio literal.
- parse_
typst_ literal - Try to parse a string as a Typst literal value.
- value_
to_ json - Serialize Value to JSON.