pub struct DiagnosticCode(/* private fields */);Expand description
Stable machine-readable diagnostic code.
The initial parser diagnostic codes are:
missing-entry-key, missing-field-separator, expected-field-name,
empty-field-value, expected-value-atom, bad-field-boundary,
bad-value-boundary, unclosed-entry, unclosed-braced-value, and
unclosed-quoted-value.
Implementations§
Source§impl DiagnosticCode
impl DiagnosticCode
Sourcepub const PARSE_ERROR: Self
pub const PARSE_ERROR: Self
Generic parse error code used before finer-grained recovery classifies a failure.
Sourcepub const MISSING_ENTRY_KEY: Self
pub const MISSING_ENTRY_KEY: Self
Entry body did not contain a citation key.
Sourcepub const MISSING_FIELD_SEPARATOR: Self
pub const MISSING_FIELD_SEPARATOR: Self
Expected a comma after an entry key or = after a field name.
Sourcepub const EXPECTED_FIELD_NAME: Self
pub const EXPECTED_FIELD_NAME: Self
Expected a field name inside an entry body.
Sourcepub const EMPTY_FIELD_VALUE: Self
pub const EMPTY_FIELD_VALUE: Self
Field separator was present but no value was provided.
Sourcepub const EXPECTED_VALUE_ATOM: Self
pub const EXPECTED_VALUE_ATOM: Self
Expected a literal, number, variable, quoted value, or braced value.
Sourcepub const BAD_FIELD_BOUNDARY: Self
pub const BAD_FIELD_BOUNDARY: Self
Expected a comma or entry close after a field value.
Sourcepub const BAD_VALUE_BOUNDARY: Self
pub const BAD_VALUE_BOUNDARY: Self
Expected a value atom after a concatenation operator.
Sourcepub const UNCLOSED_ENTRY: Self
pub const UNCLOSED_ENTRY: Self
Entry ended before its closing delimiter was found.
Sourcepub const UNCLOSED_BRACED_VALUE: Self
pub const UNCLOSED_BRACED_VALUE: Self
Braced field value ended before its closing brace was found.
Sourcepub const UNCLOSED_QUOTED_VALUE: Self
pub const UNCLOSED_QUOTED_VALUE: Self
Quoted field value ended before its closing quote was found.
Trait Implementations§
Source§impl Clone for DiagnosticCode
impl Clone for DiagnosticCode
Source§fn clone(&self) -> DiagnosticCode
fn clone(&self) -> DiagnosticCode
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 DiagnosticCode
impl Debug for DiagnosticCode
Source§impl Display for DiagnosticCode
impl Display for DiagnosticCode
Source§impl Hash for DiagnosticCode
impl Hash for DiagnosticCode
Source§impl PartialEq for DiagnosticCode
impl PartialEq for DiagnosticCode
Source§fn eq(&self, other: &DiagnosticCode) -> bool
fn eq(&self, other: &DiagnosticCode) -> bool
self and other values to be equal, and is used by ==.impl Eq for DiagnosticCode
impl StructuralPartialEq for DiagnosticCode
Auto Trait Implementations§
impl Freeze for DiagnosticCode
impl RefUnwindSafe for DiagnosticCode
impl Send for DiagnosticCode
impl Sync for DiagnosticCode
impl Unpin for DiagnosticCode
impl UnsafeUnpin for DiagnosticCode
impl UnwindSafe for DiagnosticCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more