Skip to main content

BodyPredicate

Trait BodyPredicate 

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

Extension trait for adding body matching to a predicate chain.

§For Callers

Chain this to add body content matching to your predicate. The body is inspected and matched against the provided Operation.

Important: Body predicates consume bytes from the stream. Place them last in your predicate chain when possible.

§For Implementors

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

Required Methods§

Source

fn body(self, operation: Operation) -> Body<Self>

Adds a body 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> BodyPredicate for P
where P: Predicate,