#[non_exhaustive]pub enum DecodeError {
EmptyDelimiter,
InvalidParameterLimit,
DecodeDotInKeysRequiresAllowDots,
ParameterLimitExceeded {
limit: usize,
},
ListLimitExceeded {
limit: usize,
},
DepthExceeded {
depth: usize,
},
Serde(Error),
}Expand description
Errors that can occur while decoding a query string into an crate::Object.
This enum is marked non_exhaustive so additional variants can be added in
future releases without breaking downstream matches.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyDelimiter
The configured delimiter string was empty.
InvalidParameterLimit
The configured parameter limit was zero.
DecodeDotInKeysRequiresAllowDots
crate::DecodeOptions::decode_dot_in_keys was enabled while
crate::DecodeOptions::allow_dots was disabled.
ParameterLimitExceeded
The decoded input exceeded the configured parameter limit.
ListLimitExceeded
A decoded list exceeded the configured list limit.
DepthExceeded
The decoded nesting depth exceeded the configured limit.
Serde(Error)
Serde deserialization failed after the query string was decoded into an
intermediate crate::Value tree.
Implementations§
Source§impl DecodeError
impl DecodeError
Sourcepub fn is_parameter_limit_exceeded(&self) -> bool
pub fn is_parameter_limit_exceeded(&self) -> bool
Returns true when the error reports that the parameter limit was
exceeded.
Sourcepub fn parameter_limit(&self) -> Option<usize>
pub fn parameter_limit(&self) -> Option<usize>
Returns the configured parameter limit for
Self::ParameterLimitExceeded.
Sourcepub fn is_list_limit_exceeded(&self) -> bool
pub fn is_list_limit_exceeded(&self) -> bool
Returns true when the error reports that a list limit was exceeded.
Sourcepub fn list_limit(&self) -> Option<usize>
pub fn list_limit(&self) -> Option<usize>
Returns the configured list limit for Self::ListLimitExceeded.
Sourcepub fn is_depth_exceeded(&self) -> bool
pub fn is_depth_exceeded(&self) -> bool
Returns true when the error reports that the nesting depth limit was
exceeded.
Sourcepub fn depth_limit(&self) -> Option<usize>
pub fn depth_limit(&self) -> Option<usize>
Returns the configured depth limit for Self::DepthExceeded.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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()