pub enum BoundError {
TooLarge {
limit: usize,
actual: usize,
},
TooDeep {
limit: usize,
offset: usize,
},
StringTooLong {
limit: usize,
offset: usize,
},
CollectionTooLong {
limit: usize,
offset: usize,
},
TooManyValues {
limit: usize,
offset: usize,
},
NumberTooLong {
limit: usize,
offset: usize,
},
FractionalNumber {
offset: usize,
},
DuplicateKey {
key: String,
offset: usize,
},
Syntax {
offset: usize,
expected: &'static str,
},
InvalidUtf8 {
offset: usize,
},
TrailingData {
offset: usize,
},
Empty,
}Expand description
Why a scan refused its input. Offsets are byte offsets into the input.
Variants§
TooLarge
The input is longer than max_bytes. Reported before reading content.
TooDeep
A container would nest deeper than max_depth.
StringTooLong
A string’s raw length exceeds max_string_bytes.
CollectionTooLong
An array or object has more than max_collection_len members.
TooManyValues
The document has more than max_total_values values.
NumberTooLong
A number literal is longer than max_number_bytes.
FractionalNumber
A fraction or exponent where allow_fractional_numbers is false.
DuplicateKey
A key repeated within one object, compared after decoding escapes.
key is truncated to 64 characters.
Syntax
The input is not JSON at offset; expected names what was expected.
InvalidUtf8
A string contains bytes that are not valid UTF-8.
TrailingData
Non-whitespace follows the single top-level value.
Empty
The input is empty or whitespace only.
Trait Implementations§
Source§impl Clone for BoundError
impl Clone for BoundError
Source§impl Debug for BoundError
impl Debug for BoundError
Source§impl Display for BoundError
impl Display for BoundError
impl Eq for BoundError
Source§impl Error for BoundError
impl Error for BoundError
1.30.0 · 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()