Trait carapax::PredicateExt

source ·
pub trait PredicateExt<P, PI, HI>: Sized {
    // Provided method
    fn with_predicate(self, predicate: P) -> Predicate<P, PI, Self, HI> { ... }
}
Expand description

Provides a shortcut for wrapping a Handler by a Predicate.

Provided Methods§

source

fn with_predicate(self, predicate: P) -> Predicate<P, PI, Self, HI>

Shortcut to create a wrap a Handler with a Predicate.

Example: handler.predicate(predicate).

§Arguments
  • predicate - A predicate handler.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<P, PI, H, HI> PredicateExt<P, PI, HI> for H
where H: Handler<HI>, HI: TryFromInput,