Expand description
Compatibility facade crate for Citum schema models.
This crate re-exports style-focused types from citum-schema-style
and data-focused accessors through citum-schema-data.
Modules§
- citation
- Compatibility facade merging data input types with style-specific logic.
- data
- Data-oriented schema exports.
- embedded
- Embedded templates for priority styles (APA, Chicago, Vancouver, IEEE, Harvard). Embedded priority templates for common citation styles.
- grouping
- Bibliography grouping and sorting specifications.
- lint
- Lint helpers for raw locales and styles. Lint helpers for raw locales and styles.
- locale
- Locale-specific terms and translations. Locale definitions for Citum.
- macros
- Declarative macros for AST and configurations. Declarative macros for the Citum ecosystem.
- options
- Style configuration options. Style configuration options.
- presets
- Configuration presets for common styles. Style presets for common formatting patterns.
- reference
- Bibliographic reference data types. A reference is a bibliographic item, such as a book, article, or web page. It is the basic unit of bibliographic data.
- registry
- Style registry — discovery and alias resolution. Style registry — discovery and alias resolution for citation styles.
- style_
base - Style base-inheritance mechanism (named compiled-in Style structs). Style base-inheritance mechanism for named compiled-in styles.
- template
- Citation and bibliography template components. Template components for Citum styles.
- version
- Style schema version and resource-limit constants. Style schema version and resource-limit constants.
Macros§
- bib_map
- Builds an
IndexMap<String, InputReference>from key-value pairs. - citation
- Builds a
Citationfrom a list ofCitationItemexpressions with optional named fields. - citation_
item - Builds a
CitationItemwith optional named fields. - citation_
locator - Builds a
CitationLocatorvalue. - cite
- Builds a
Citationwith oneCitationItem. - dispatch_
component - Dispatches an operation across all variants of
TemplateComponent. Requires$targetto be aTemplateComponentand provides$innerto the closure/expression provided in$action. - merge_
options - Merges fields from a target struct
sourceinto a mutabletargetifsource.field.is_some(). This simplifies boilerplate in configuration merge implementations. - ref_
article - Builds an
InputReference::SerialComponent(journal article) with a single author. - ref_
article_ authors - Builds an
InputReference::SerialComponent(journal article) with multiple authors. - ref_
book - Builds an
InputReference::Monograph(book) with a single structured-name author. - ref_
book_ authors - Builds an
InputReference::Monograph(book) with multiple structured-name authors. - str_
enum - Generates a string-backed enum that gracefully captures unknown variants.
- tc_
contributor - Build a contributor
TemplateComponentwith optional rendering overrides. - tc_date
- Build a date
TemplateComponentwith optional rendering overrides. - tc_
group - Build a group
TemplateComponentwith optional rendering options. - tc_
number - Build a number
TemplateComponentwith optional rendering overrides. - tc_term
- Build a term
TemplateComponentwith optional rendering overrides. - tc_
title - Build a title
TemplateComponentwith optional rendering overrides. - tc_
variable - Build a variable
TemplateComponentwith optional rendering overrides.
Structs§
- Bibliography
Group - A bibliography group with selector, optional heading, and per-group sorting.
- Bibliography
Options - Bibliography-local option overrides.
- Bibliography
Spec - Bibliography specification.
- Citation
- A citation containing one or more references.
- Citation
Item - A single citation item referencing a bibliography entry.
- Citation
Options - Citation-local option overrides.
- Citation
Spec - Citation specification.
- Config
- Top-level style configuration.
- Group
Selector - Selector predicate for matching references to groups.
- Group
Sort - Per-group sorting specification.
- Group
Sort Key - A single sort key in a group sorting template.
- Input
Bibliography - A collection of bibliographic references with optional metadata.
- Input
Bibliography Info - Metadata for an input bibliography.
- Locale
- A locale definition containing language-specific terms and formatting rules.
- Localized
Template Spec - Locale-scoped template override with optional fallback behavior.
- Registry
Entry - A single entry in a style registry.
- Rendering
- Rendering instructions applied to template components.
- Schema
Version - A schema version (major.minor).
- Style
- The new Citum Style model.
- Style
Info - Style metadata.
- Style
Link - A hyperlink associated with a style (documentation, self-link, etc.).
- Style
Person - A person credit (author or contributor) for a style.
- Style
Registry - A registry of citation styles with alias resolution.
- Style
Source - Provenance block for styles adapted from a CSL 1.0 source.
- Template
AddOperation - Addition operation that inserts a component before or after an anchor.
- Template
Component Selector - Partial component selector used to locate anchors in a template.
- Template
Contributor - A contributor component for rendering names.
- Template
Date - A date component for rendering dates.
- Template
Group - A group component for grouping multiple components with a delimiter,
matching CSL 1.0
<group>semantics. - Template
Modify Operation - Rendering-only modification for the component matched by
match. - Template
Number - A number component (volume, issue, pages, etc.).
- Template
Remove Operation - Removal operation for the component matched by
match. - Template
Term - A term component for rendering locale-specific text.
- Template
Title - A title component.
- Template
Variable - A simple variable component (DOI, ISBN, URL, etc.).
- Template
Variant Diff - Structural diff that derives a type-specific template from a parent template.
- Wrap
Config - Wrapping punctuation and optional inner affixes applied around a rendered value.
Enums§
- Citation
Collapse - Citation collapse behavior for multi-item citations.
- Citation
Field - Discipline/field classification for a citation style.
- Citation
Mode - Citation mode for author-date styles.
- Cited
Status - Citation status filter.
- Contributor
Preset - Contributor formatting presets.
- Date
Preset - Date formatting presets.
- Field
Matcher - Field value matcher.
- Group
Heading - Localizable heading source for bibliography groups.
- Group
Sort Entry - Citation sort configuration: either a preset name or explicit configuration.
- Integral
Name State - Explicit integral citation name-memory state for one citation item.
- Locator
Type - Locator types for pinpoint citations.
- Name
Sort Order - Name sorting order for culturally appropriate collation.
- Note
Start Text Case - Text-case transform applied when a citation renders at note start.
- Position
- Position of a citation in the document flow.
- Resolution
Error - Error type for style resolution and inheritance processing at the schema layer.
- Resolver
Error - Error type for style resolution operations at the store layer.
- Schema
Warning - A non-fatal validation warning emitted by
Style::validate. - SortKey
- Sort key selector.
- Sort
Preset - Sort order presets for bibliography entries.
- Style
Base - A named, compiled-in style base that serves as an inheritance root.
- Substitute
Preset - Substitute presets for author substitution fallback logic.
- Template
Component - A template component - the building blocks of citation/bibliography templates.
- Template
Preset - Available embedded template presets.
- Template
Reference - A reference to a template, which can be either a named builtin preset
or a URI (e.g.,
file://...,@hub/...,https://...). - Template
Variant - Type-specific template override, either as a complete legacy template or a V3 diff.
- Text
Case - Text-case transform applied to title-like fields.
- Title
Preset - Title formatting presets.
- Type
Selector - Selector for reference types in overrides. Can be a single type string or a list of types.
- Vertical
Align - Vertical text alignment relative to the baseline.
- Wrap
Punctuation - Punctuation to wrap a component in.
Constants§
- MAX_
TEMPLATE_ COMPONENTS - Maximum accepted authored template components in one style.
- MAX_
TEMPLATE_ NESTING_ DEPTH - Maximum accepted nesting depth for authored template groups and fallbacks.
- SCHEMA_
VERSION - Canonical Citum style schema version for external consumers.
- STYLE_
SCHEMA_ VERSION - Canonical Citum style schema version used when
Style.versionis omitted.
Functions§
- check_
citum_ version - Apply an
info.citum-versionrequirement check against the running engine version (CARGO_PKG_VERSION).
Type Aliases§
- Citations
- A list of citations to process.
- Style
Resolver - Resolver interface used by schema-layer style inheritance.
- Template
- A named template (reusable sequence of components).
- Template
Variants - Type-specific template variants keyed by reference-type selector.