Function warp::filter::wrap::wrap_fn

source ·
pub fn wrap_fn<F, T, U>(func: F) -> WrapFn<F>
where F: Fn(T) -> U, T: Filter, U: Filter,
Expand description

Combines received filter with pre and after filters

§Example

use crate::warp::Filter;

let route = warp::any()
    .map(|| "hello world")
    .with(warp::wrap_fn(|filter| filter));

You can find the full example in the usage example.