/// Create a new instance from a reader.
Create a new instance from a reader.
Create a new instance from a reader .
pub fn with_reader<R>(status: u16, reader: R) -> Self
    where
        R: BufRead + Unpin + Send + Sync + 'static,
    {
        let status = crate::StatusCode::try_from(status).expect("invalid status code");
        let mut res = http_types::Response::new(status);
        res.set_body(Body::from_reader(reader, None));
        Self {
            res,
            cookie_events: vec![],
        }
    }
pub fn with_reader < R > ( status : u16 , reader : R ) -> Self where R : BufRead + Unpin + Send + Sync + ' static , { let status = crate :: StatusCode :: try_from ( status ) . expect ( " " ) ; let mut res = http_types :: Response :: new ( status ) ; res . set_body ( Body :: from_reader ( reader , None ) ) ; Self { res , cookie_events : vec ! [ ] , } }
Create a new instance from a reader.
Create a new instance from a reader .
status
u16
reader
R