Skip to main content

peek_input_until_verdict_growing_with_output

Function peek_input_until_verdict_growing_with_output 

pub async fn peek_input_until_verdict_growing_with_output<R, O, P>(
    reader: &mut R,
    buffer: &mut Vec<u8>,
    max_len: usize,
    read_chunk: NonZero<usize>,
    timeout: Option<Duration>,
    predicate: P,
) -> PeekOutput<O>
where R: AsyncRead + Unpin, P: Fn(&[u8]) -> PeekVerdict<O>,
Available on crate feature std only.
Expand description

Same as peek_input_until_verdict_growing, but returns the complete PeekOutput so callers can distinguish a timeout from a definitive rejection and other inconclusive stop conditions.