Skip to main content

read_chunk

Function read_chunk 

Source
pub async fn read_chunk(
    response: &mut Response,
    cancel: &CancellationToken,
    interrupted: &str,
) -> Result<Option<Vec<u8>>, String>
Expand description

The next chunk of a response body, or None at the end. Fails with pi’s message when cancel fires or the connection drops: interrupted when it fires during the read.