Trait 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.

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, PI, H, HI> PredicateExt<P, PI, HI> for H
where H: Handler<HI>, HI: TryFromInput,