I am trying to send a stream of data with a specific size without the content length header. I believe hyper::body::Body::wrap_stream is what I'm looking for. However, I'm not sure how to extend the example of creating a vector of results given in documentation to incorporate a custom size.
I'm looking for something like this, but I don't know the best way to resolve issues with vec![Ok(0); bytes].
let chunks: Vec<Result<_, std::io::Error>> = vec![Ok(0); bytes];
let stream = futures_util::stream::iter(chunks);
let body = Body::wrap_stream(stream);