pub enum FilterPath<'a, T> {
Filter {
left: Box<dyn Path<'a, Data = T> + 'a>,
right: Box<dyn Path<'a, Data = T> + 'a>,
op: &'a FilterSign,
},
Or {
left: Box<dyn Path<'a, Data = T> + 'a>,
right: Box<dyn Path<'a, Data = T> + 'a>,
},
And {
left: Box<dyn Path<'a, Data = T> + 'a>,
right: Box<dyn Path<'a, Data = T> + 'a>,
},
Not {
exp: Box<dyn Path<'a, Data = T> + 'a>,
},
}
Expand description
process filter element like [?(op sign op)]
Variants§
Trait Implementations§
Source§impl<'a, T> Path<'a> for FilterPath<'a, T>where
T: JsonLike,
impl<'a, T> Path<'a> for FilterPath<'a, T>where
T: JsonLike,
type Data = T
Source§fn find(
&self,
input: JsonPathValue<'a, Self::Data>,
) -> Vec<JsonPathValue<'a, Self::Data>>
fn find( &self, input: JsonPathValue<'a, Self::Data>, ) -> Vec<JsonPathValue<'a, Self::Data>>
when every element needs to handle independently
Source§fn flat_find(
&self,
input: Vec<JsonPathValue<'a, Self::Data>>,
_is_search_length: bool,
) -> Vec<JsonPathValue<'a, Self::Data>>
fn flat_find( &self, input: Vec<JsonPathValue<'a, Self::Data>>, _is_search_length: bool, ) -> Vec<JsonPathValue<'a, Self::Data>>
when the whole output needs to handle
Auto Trait Implementations§
impl<'a, T> Freeze for FilterPath<'a, T>
impl<'a, T> !RefUnwindSafe for FilterPath<'a, T>
impl<'a, T> !Send for FilterPath<'a, T>
impl<'a, T> !Sync for FilterPath<'a, T>
impl<'a, T> Unpin for FilterPath<'a, T>
impl<'a, T> !UnwindSafe for FilterPath<'a, T>
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