pub enum Error {
LexerError(LexerError),
InvalidJSON(Position),
TrailingData(Position),
MaxDepthExceeded {
position: Position,
limit: usize,
},
MaxStringLengthExceeded {
position: Position,
limit: usize,
str: String,
},
MaxArrayEntriesExceeded {
position: Position,
limit: usize,
},
MaxObjectEntriesExceeded {
position: Position,
limit: usize,
},
MaxObjectEntryNameLengthExceeded {
position: Position,
limit: usize,
name: String,
},
DuplicateObjectEntryName {
position: Position,
key: String,
},
Bug {
msg: String,
position: Position,
},
}
Expand description
Error occurred during JSON validation
Variants§
LexerError(LexerError)
Error occurred during lexing
InvalidJSON(Position)
Error occurred once the JSON is invalid, such as unclosed object or array
TrailingData(Position)
Error occurred when there is trailing data after the valid JSON
MaxDepthExceeded
Error occurred when the maximum depth is exceeded
MaxStringLengthExceeded
Error occurred when the maximum string length is exceeded
Fields
MaxArrayEntriesExceeded
Error occurred when the maximum array entries is exceeded
Fields
MaxObjectEntriesExceeded
Error occurred when the maximum object entries is exceeded
Fields
MaxObjectEntryNameLengthExceeded
Error occurred when the maximum object entry name length is exceeded
Fields
DuplicateObjectEntryName
Error occurred when there is a duplicate object entry name
Bug
Error occurred when running into unexpected state, please report this issue to the maintainer
Trait Implementations§
Source§impl Debug for ValidatorError
impl Debug for ValidatorError
Source§impl Display for ValidatorError
impl Display for ValidatorError
Source§impl Error for ValidatorError
impl Error for ValidatorError
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 From<LexerError> for ValidatorError
impl From<LexerError> for ValidatorError
Source§fn from(source: LexerError) -> Self
fn from(source: LexerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ValidatorError
impl !RefUnwindSafe for ValidatorError
impl Send for ValidatorError
impl Sync for ValidatorError
impl Unpin for ValidatorError
impl !UnwindSafe for ValidatorError
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