#[non_exhaustive]pub enum CiteError {
Parse {
file: Option<PathBuf>,
message: String,
},
DuplicateKey {
key: String,
first_file: PathBuf,
second_file: PathBuf,
},
UnknownCitation {
key: String,
},
Io {
path: PathBuf,
source: Error,
},
}Expand description
Errors that can occur while loading a bibliography or processing citations.
This error type is non-exhaustive and may gain new variants in future releases.
§Variants
Parse: a.bibfile’s contents are malformed.fileisNonewhen the parser was handed a string directly rather than a file on disk.DuplicateKey: one citation key is defined by two.bibfiles in the same directory, so which entry a citation refers to is ambiguous.UnknownCitation: a[@key]citation names a key no loaded.bibfile defines.Io: a.bibfile or its directory could not be read.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Parse
Malformed .bib contents. file is None when parsing a bare string.
Fields
DuplicateKey
One citation key defined by two files in the same bibliography directory.
Fields
UnknownCitation
A citation naming a key no loaded .bib file defines.
Io
A .bib file or bibliography directory could not be read.
Trait Implementations§
Source§impl Error for CiteError
impl Error for CiteError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for CiteError
impl !UnwindSafe for CiteError
impl Freeze for CiteError
impl Send for CiteError
impl Sync for CiteError
impl Unpin for CiteError
impl UnsafeUnpin for CiteError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more