use actix_codec::Framed; use actix_http::{h1::Codec, Request}; use crate::state::State; pub struct FramedRequest { req: Request, framed: Framed, state: State, } impl FramedRequest { pub fn new(req: Request, framed: Framed, state: State) -> Self { Self { req, framed, state } } } impl FramedRequest { pub fn request(&self) -> &Request { &self.req } pub fn request_mut(&mut self) -> &mut Request { &mut self.req } pub fn into_parts(self) -> (Request, Framed, State) { (self.req, self.framed, self.state) } }