use std::convert::Infallible; use http_body_util::Full; use hyper::{body::Bytes, Response, StatusCode}; pub fn not_found() -> std::result::Result>, Infallible> { let mut response = Response::new(Full::new(Bytes::from("404"))); *response.status_mut() = StatusCode::NOT_FOUND; Ok(response) }