#[non_exhaustive]
pub enum Error {
Show 21 variants
Parse(String),
Val(Val),
Char(isize),
Str(Val),
Arr(Val),
Length(Val),
Round(Val),
FromJson(Val, String),
Has(Val, Val),
Keys(Val),
Iter(Val),
Neg(Val),
MathOp(Val, MathOp, Val),
Index(Val),
IndexWith(Val, Val),
IndexOutOfBounds(isize),
Int(Val),
SliceAssign(Val),
PathExp,
Regex(String),
RegexFlag(char),
}Expand description
Errors that can occur during filter execution.
Each variant shows an example of how it can be produced.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Parse(String)
inputs (when given invalid JSON data)
Val(Val)
0 | error
Char(isize)
[1114112] | implode
Str(Val)
{(0): 1} or 0 | fromjson or 0 | explode or "a b c" | split(0)
Arr(Val)
0 | sort or 0 | implode
Length(Val)
0 == 0 | length
Round(Val)
"a" | round
FromJson(Val, String)
"[1, 2" | fromjson
Has(Val, Val)
[] | has("a") or {} | has(0)
Keys(Val)
0 | keys
Iter(Val)
0 | .[]
Neg(Val)
-"a"
MathOp(Val, MathOp, Val)
1 - "a"
Index(Val)
0 | .[0]
IndexWith(Val, Val)
{} | .[0]
IndexOutOfBounds(isize)
[] | .[0] = 0
Int(Val)
[] | .["a"] or limit("a"; 0) or range(0; "a")
SliceAssign(Val)
[] | .[0:] = 0
PathExp
0 |= .+1
Regex(String)
"a" | test("(")
RegexFlag(char)
"a" | test("."; "b")
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for Error
impl PartialEq<Error> for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.