Skip to main content

Module item

Module item 

Source
Expand description

The CSL item data model; the typed input data a CSL style formats.

This mirrors the “CSL-JSON” shape from the CSL 1.0.2 specification (Appendix III item types, Appendix IV variables) as typed Rust. An Item is an id plus an ItemType and four category-keyed maps of variables (string, number, date, name). Everything is stored in BTreeMaps keyed by ordered enums, so iteration is deterministic.

Macros§

csl_vocab 🔒
Generate a closed CSL vocabulary enum with as_str / from_csl / Display.

Structs§

Date
A CSL date-variable value: a single date, a range (start..end), or a free-form literal. circa marks an approximate date.
DateParts
One date in a CSL Date; any subset of the parts may be present.
Item
A single bibliographic item; the unit a CSL style formats.
Name
A personal or institutional name (specification “Name” name-parts).

Enums§

DateVariable
CSL date variables (specification Appendix IV).
ItemType
CSL item types (specification Appendix III).
NameVariable
CSL name variables (specification Appendix IV).
NumberVariable
CSL number variables (specification Appendix IV).
StandardVariable
CSL string (“standard”) variables (specification Appendix IV).