iron::iexpect! [] [src]

macro_rules! iexpect {
    ($option:expr) => (iexpect!($option, $crate::status::BadRequest));
    ($option:expr, $modifier:expr) => (match $option {
        ::std::option::Option::Some(x) => x,
        ::std::option::Option::None => return ::std::result::Result::Ok(
            $crate::response::Response::with($modifier))
    })
}

Unwrap the given Option or return a Ok(Response::new()) with the given modifier. The default modifier is status::BadRequest.