#[non_exhaustive]pub enum ParseError {
NoIdentifier {
entry_key: Option<String>,
},
InvalidRef {
raw: String,
entry_key: Option<String>,
source: RefParseError,
},
Decode {
format: &'static str,
message: String,
},
UnsupportedFormat {
format: &'static str,
},
}Expand description
Why a single bibliography entry failed to produce a Ref.
Closed-enum so the failure-class can be exposed at the
docs/ERRORS.md §3 INVALID_REF surface without leaking parser
internals.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoIdentifier
The line did not contain a doi: / arxiv: / bare-DOI /
bare-arXiv id — empty (after trimming) or just a comment.
Plain-refs path filters these out silently; CSL-JSON path
emits this when an entry has no resolvable identifier.
InvalidRef
The identifier was present but Ref::parse rejected it
(malformed DOI suffix, invalid arXiv id shape, etc.).
Fields
source: RefParseErrorThe structured Ref::parse failure.
Decode
The whole input did not deserialise — CSL-JSON that is not a
JSON array, top-level malformed JSON, etc. This is a
whole-input failure, not a per-entry failure; callers receive
it as the sole Err element of the result iterator.
Fields
UnsupportedFormat
Format requested or detected, but the parser for that format is
not yet shipped. Today this is the .bib / BibLaTeX path —
users should re-export their library as CSL-JSON from Zotero
until slice 2 ships.
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ParseError
impl PartialEq for ParseError
Source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
self and other values to be equal, and is used by ==.