use http::Response; use http_body_util::Full; use hyper::body::Bytes; use std::convert::Infallible; pub struct Responder; impl Responder { pub fn unathorized() -> Result>, Infallible> { Ok(Response::builder() .status(401) .body(Full::new(Bytes::from("Unauthorized"))) .unwrap()) } }