Skip to main content

read_exact_with_timeout

Function read_exact_with_timeout 

Source
pub async fn read_exact_with_timeout<S, B>(
    stream: &mut S,
    buf: B,
    duration: Option<Duration>,
) -> Result<BufResult<(), B>>
where S: AsyncRead + Unpin, B: IoBufMut,
Expand description

Execute an async read_exact operation with a timeout.

Reads exactly the full buffer or returns an error.