Skip to main content

Crate citum_schema

Crate citum_schema 

Source
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 Citation from a list of CitationItem expressions with optional named fields.
citation_item
Builds a CitationItem with optional named fields.
citation_locator
Builds a CitationLocator value.
cite
Builds a Citation with one CitationItem.
dispatch_component
Dispatches an operation across all variants of TemplateComponent. Requires $target to be a TemplateComponent and provides $inner to the closure/expression provided in $action.
merge_options
Merges fields from a target struct source into a mutable target if source.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 TemplateComponent with optional rendering overrides.
tc_date
Build a date TemplateComponent with optional rendering overrides.
tc_group
Build a group TemplateComponent with optional rendering options.
tc_number
Build a number TemplateComponent with optional rendering overrides.
tc_term
Build a term TemplateComponent with optional rendering overrides.
tc_title
Build a title TemplateComponent with optional rendering overrides.
tc_variable
Build a variable TemplateComponent with optional rendering overrides.

Structs§

BibliographyGroup
A bibliography group with selector, optional heading, and per-group sorting.
BibliographyOptions
Bibliography-local option overrides.
BibliographySpec
Bibliography specification.
Citation
A citation containing one or more references.
CitationItem
A single citation item referencing a bibliography entry.
CitationOptions
Citation-local option overrides.
CitationSpec
Citation specification.
Config
Top-level style configuration.
GroupSelector
Selector predicate for matching references to groups.
GroupSort
Per-group sorting specification.
GroupSortKey
A single sort key in a group sorting template.
InputBibliography
A collection of bibliographic references with optional metadata.
InputBibliographyInfo
Metadata for an input bibliography.
Locale
A locale definition containing language-specific terms and formatting rules.
LocalizedTemplateSpec
Locale-scoped template override with optional fallback behavior.
RegistryEntry
A single entry in a style registry.
Rendering
Rendering instructions applied to template components.
SchemaVersion
A schema version (major.minor).
Style
The new Citum Style model.
StyleInfo
Style metadata.
StyleLink
A hyperlink associated with a style (documentation, self-link, etc.).
StylePerson
A person credit (author or contributor) for a style.
StyleRegistry
A registry of citation styles with alias resolution.
StyleSource
Provenance block for styles adapted from a CSL 1.0 source.
TemplateAddOperation
Addition operation that inserts a component before or after an anchor.
TemplateComponentSelector
Partial component selector used to locate anchors in a template.
TemplateContributor
A contributor component for rendering names.
TemplateDate
A date component for rendering dates.
TemplateGroup
A group component for grouping multiple components with a delimiter, matching CSL 1.0 <group> semantics.
TemplateModifyOperation
Rendering-only modification for the component matched by match.
TemplateNumber
A number component (volume, issue, pages, etc.).
TemplateRemoveOperation
Removal operation for the component matched by match.
TemplateTerm
A term component for rendering locale-specific text.
TemplateTitle
A title component.
TemplateVariable
A simple variable component (DOI, ISBN, URL, etc.).
TemplateVariantDiff
Structural diff that derives a type-specific template from a parent template.
WrapConfig
Wrapping punctuation and optional inner affixes applied around a rendered value.

Enums§

CitationCollapse
Citation collapse behavior for multi-item citations.
CitationField
Discipline/field classification for a citation style.
CitationMode
Citation mode for author-date styles.
CitedStatus
Citation status filter.
ContributorPreset
Contributor formatting presets.
DatePreset
Date formatting presets.
FieldMatcher
Field value matcher.
GroupHeading
Localizable heading source for bibliography groups.
GroupSortEntry
Citation sort configuration: either a preset name or explicit configuration.
IntegralNameState
Explicit integral citation name-memory state for one citation item.
LocatorType
Locator types for pinpoint citations.
NameSortOrder
Name sorting order for culturally appropriate collation.
NoteStartTextCase
Text-case transform applied when a citation renders at note start.
Position
Position of a citation in the document flow.
ResolutionError
Error type for style resolution and inheritance processing at the schema layer.
ResolverError
Error type for style resolution operations at the store layer.
SchemaWarning
A non-fatal validation warning emitted by Style::validate.
SortKey
Sort key selector.
SortPreset
Sort order presets for bibliography entries.
StyleBase
A named, compiled-in style base that serves as an inheritance root.
SubstitutePreset
Substitute presets for author substitution fallback logic.
TemplateComponent
A template component - the building blocks of citation/bibliography templates.
TemplatePreset
Available embedded template presets.
TemplateReference
A reference to a template, which can be either a named builtin preset or a URI (e.g., file://..., @hub/..., https://...).
TemplateVariant
Type-specific template override, either as a complete legacy template or a V3 diff.
TextCase
Text-case transform applied to title-like fields.
TitlePreset
Title formatting presets.
TypeSelector
Selector for reference types in overrides. Can be a single type string or a list of types.
VerticalAlign
Vertical text alignment relative to the baseline.
WrapPunctuation
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.version is omitted.

Functions§

check_citum_version
Apply an info.citum-version requirement check against the running engine version (CARGO_PKG_VERSION).

Type Aliases§

Citations
A list of citations to process.
StyleResolver
Resolver interface used by schema-layer style inheritance.
Template
A named template (reusable sequence of components).
TemplateVariants
Type-specific template variants keyed by reference-type selector.