#[non_exhaustive]pub enum Error<V = Val> {
Val(V),
Type(V, Type),
MathOp(V, MathOp, V),
Index(V, V),
IndexOutOfBounds(isize),
PathExp,
TailCall(TailCall<V>),
}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.
Val(V)
0 | error
Type(V, Type)
Expected a value of given type, but got something else
MathOp(V, MathOp, V)
1 - "a"
Index(V, V)
{} | .[0] or [] | has("a") or {} | has(0)
IndexOutOfBounds(isize)
[] | .[0] = 0
PathExp
0 |= .+1
TailCall(TailCall<V>)
Tail-recursive call.
This is used internally to execute tail-recursive filters. If this can be observed by users, then this is a bug.
Implementations§
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.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()
impl<V: Eq> Eq for Error<V>
impl<V> StructuralPartialEq for Error<V>
Auto Trait Implementations§
impl<V> Freeze for Error<V>where
V: Freeze,
impl<V> RefUnwindSafe for Error<V>where
V: RefUnwindSafe,
impl<V = Val> !Send for Error<V>
impl<V = Val> !Sync for Error<V>
impl<V> Unpin for Error<V>where
V: Unpin,
impl<V> UnwindSafe for Error<V>where
V: UnwindSafe + RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.