/// Create a new filter from a fragment of query URL. The expected
/// input is a `lhs=rhs` pair from a query string, with `lhs` and
/// `rhs` given together in a single string. The output will
/// either be an error, or a [`Filter`] which can apply the
/// specified test to objects of the target type, returning
/// either `true` (include) or `false` (exclude).
Create a new filter from a fragment of query URL.
Create a new filter from a fragment of query URL .
pub fn create_filter_from_query(
        &self,
        expr: &str,
    ) -> Result<Box<dyn Filter<R> + 'a>, FilterError> {
        let parts = expr.splitn(2, '=').collect::<Vec<_>>();
        if parts.len() != 2 {
            Err(FilterError::MissingEquals)
        } else {
            self.create_filter_from_query_pair(parts[0], parts[1])
        }
    }
pub fn create_filter_from_query ( & self , expr : & str , ) -> Result < Box < dyn Filter < R > + ' a > , FilterError > { let parts = expr . splitn ( 2 , '=' ) . collect :: < Vec < _ > > ( ) ; if parts . len ( ) != 2 { Err ( FilterError :: MissingEquals ) } else { self . create_filter_from_query_pair ( parts [ 0 ] , parts [ 1 ] ) } }
Create a new filter from a fragment of query URL.
Create a new filter from a fragment of query URL .
&self
expr
&str