fn with_segment<F, U>(route: &mut Route, func: F) -> Result<U, Rejection>where F: Fn(&str) -> Result<U, Rejection>,