pub enum RefsInput {
Path(String),
Yaml(String),
Json(Value),
Biblatex(String),
}Expand description
A refs input that can be resolved locally or by an external resolver.
This union type allows callers to supply reference data by local file path, inline YAML, inline JSON, or inline BibLaTeX. Enables citum-server and bindings to accept references from files (e.g., via pipe transport from LaTeX or Emacs).
Supported tagged-object shapes over JSON/RPC:
{"kind": "path", "value": "/abs/path/refs.yaml"}
{"kind": "path", "value": "/abs/path/refs.bib"} // .bib detected by extension
{"kind": "yaml", "value": "references:\n - id: …"}
{"kind": "json", "value": {"id": { … }}}
{"kind": "biblatex", "value": "@book{key, title={…}, …}"}Variants§
Path(String)
Local filesystem path to a refs file.
YAML/JSON/CBOR extensions are loaded as native Citum refs; .bib
extensions are parsed as BibLaTeX.
Yaml(String)
Inline YAML refs string.
Json(Value)
Inline JSON map of reference objects.
Biblatex(String)
Inline BibLaTeX (.bib) content.
Implementations§
Source§impl RefsInput
impl RefsInput
Sourcepub fn resolve_local(&self) -> Result<Bibliography, FormatDocumentError>
pub fn resolve_local(&self) -> Result<Bibliography, FormatDocumentError>
Resolve refs input locally from Path, Yaml, Json, or Biblatex variants.
For Path inputs, .bib files are parsed as BibLaTeX; all other
extensions are parsed as native Citum YAML/JSON/CBOR.
§Errors
Returns error for refs input filesystem or parse failures.