Skip to main content

read_bounded

Function read_bounded 

Source
pub async fn read_bounded<R: AsyncRead + Unpin>(
    reader: R,
    limit: usize,
) -> Result<Vec<u8>>
Expand description

Stop on the first byte beyond the limit, without retaining that excess.