Skip to main content

QueryPredicate

Trait QueryPredicate 

Source
pub trait QueryPredicate: Sized {
    // Required method
    fn query(self, operation: Operation) -> Query<Self>;
}
Expand description

Extension trait for adding query parameter matching to a predicate chain.

§For Callers

Chain this to match requests by their URL query parameters. Use the Operation enum to specify exact matches, existence checks, or set membership.

§For Implementors

This trait is automatically implemented for all Predicate types. You don’t need to implement it manually.

Required Methods§

Source

fn query(self, operation: Operation) -> Query<Self>

Adds a query parameter match to this predicate chain.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<P> QueryPredicate for P
where P: Predicate,