Skip to main content

HeaderPredicate

Trait HeaderPredicate 

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

Extension trait for adding header matching to a predicate chain.

§For Callers

Chain this to add header matching to your predicate. The request or response headers are inspected and matched against the provided Operation.

§For Implementors

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

Required Methods§

Source

fn header(self, operation: Operation) -> Header<Self>

Adds a header matching operation 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> HeaderPredicate for P
where P: Predicate,