pub enum ParserError {
Show 28 variants
EmptyInput,
UnexpectedEndOfInput,
InvalidStringEscape,
DuplicateValueInSet {
value: Value,
},
DuplicateKeyInMap {
value: Value,
},
InvalidElementForTag {
value: Value,
},
NamespacedMapTagNeedsMap {
namespace: String,
got_instead_of_map: Value,
},
InvalidCharacterSpecification,
UnexpectedCharacter(char),
InvalidKeyword,
InvalidSymbol,
OddNumberOfMapElements,
InvalidInst(Option<ParseError>),
InvalidUuid(Option<Error>),
CannotHaveSlashAtBeginningOfSymbol,
CannotHaveSlashAtEndOfSymbol,
CannotHaveMoreThanOneSlashInSymbol,
CannotHaveColonInSymbol,
CannotHaveSlashAtBeginningOfKeyword,
CannotHaveSlashAtEndOfKeyword,
CannotHaveMoreThanOneSlashInKeyword,
CannotHaveColonInKeyword,
OnlyZeroCanStartWithZero,
BadFloat {
parsing: String,
encountered: ParseFloatError,
},
BadInt {
parsing: String,
encountered: ParseIntError,
},
BadBigDec {
parsing: String,
encountered: ParseBigDecimalError,
},
BadBigInt {
parsing: String,
encountered: ParseBigIntError,
},
ExtraInput {
parsed_value: Value,
},
}Expand description
The errors that can be encountered during parsing.
Variants§
EmptyInput
UnexpectedEndOfInput
InvalidStringEscape
DuplicateValueInSet
DuplicateKeyInMap
InvalidElementForTag
NamespacedMapTagNeedsMap
InvalidCharacterSpecification
UnexpectedCharacter(char)
InvalidKeyword
InvalidSymbol
OddNumberOfMapElements
InvalidInst(Option<ParseError>)
InvalidUuid(Option<Error>)
CannotHaveSlashAtBeginningOfSymbol
CannotHaveSlashAtEndOfSymbol
CannotHaveMoreThanOneSlashInSymbol
CannotHaveColonInSymbol
CannotHaveSlashAtBeginningOfKeyword
CannotHaveSlashAtEndOfKeyword
CannotHaveMoreThanOneSlashInKeyword
CannotHaveColonInKeyword
OnlyZeroCanStartWithZero
BadFloat
BadInt
BadBigDec
BadBigInt
ExtraInput
Trait Implementations§
Source§impl Debug for ParserError
impl Debug for ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§impl Error for ParserError
impl Error for ParserError
1.30.0 · 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()
Source§impl PartialEq for ParserError
impl PartialEq for ParserError
impl StructuralPartialEq for ParserError
Auto Trait Implementations§
impl Freeze for ParserError
impl RefUnwindSafe for ParserError
impl Send for ParserError
impl Sync for ParserError
impl Unpin for ParserError
impl UnwindSafe for ParserError
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
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>
Converts
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>
Converts
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