[][src]Function httptest::mappers::any_of

pub fn any_of<IN>(inner: Vec<Box<dyn Mapper<IN, Out = bool>>>) -> AnyOf<IN> where
    IN: ?Sized

true if any of the provided matchers returns true. See the any_of! macro for convenient usage.

Example

use httptest::mappers::*;

// A request matcher that matches a request to path "/foo"
// or matches the reqex '^/test/(foo|bar)$'.
let mut m = any_of![
    request::path("/foo"),
    request::path(matches("^/test/(foo|bar)$")),
];