[][src]Function async_httype::relay_sized_stream

pub async fn relay_sized_stream<'_, '_, I, O>(
    input: &'_ mut I,
    output: &'_ mut O,
    length: usize
) -> Result<usize, Error> where
    I: Read + Unpin,
    O: Write + Unpin

Streams body data of known size from input to output. An exact body length (e.g. Content-Length header) must be provided for this transfer type.

The method expects that the input holds only body data. This means that we have to read input protocol headers before we call this method.