Module peek
Available on crate feature
std only.Structs§
- Peek
Output - Result of a
peek_input_untilcall. - Peek
Router - A generic
Servicerouter driven by a fail-fastPeekVerdictpredicate. - Peek
Timeout Error - protocol peek timed out before reaching a definitive verdict
Enums§
- Peek
Stop Reason - Reason a protocol peek operation stopped.
- Peek
Timeout Policy - Policy applied when protocol peeking reaches its configured timeout before a definitive match or rejection.
- Peek
Verdict - Verdict returned by a fail-fast peek predicate, used with
peek_input_until_verdictandpeek_input_until_verdict_with_options.
Constants§
- DEFAULT_
PEEK_ MAX_ SIZE - Default maximum number of bytes inspected by
PeekRouter. - DEFAULT_
PEEK_ READ_ CHUNK_ SIZE - Default number of bytes requested per read by
PeekRouter.
Functions§
- peek_
input_ until - Read into
bufferuntilpredicatematches, peeking stops, or the optionaltimeoutexpires. - peek_
input_ until_ verdict - Fail-fast variant of
peek_input_untilusing aPeekVerdictpredicate. - peek_
input_ until_ verdict_ growing - Fail-fast peek that grows its buffer on demand up to
max_len, instead of reading into a fixed caller-provided slice likepeek_input_until_verdict_with_options. - peek_
input_ until_ verdict_ growing_ with_ output - Same as
peek_input_until_verdict_growing, but returns the completePeekOutputso callers can distinguish a timeout from a definitive rejection and other inconclusive stop conditions. - peek_
input_ until_ verdict_ with_ options - Same as
peek_input_until_with_optionsbut with a fail-fast three-wayPeekVerdictpredicate. This is the core peek loop; theOption-based helpers are thin wrappers that never reject. - peek_
input_ until_ with_ offset - Same as
peek_input_untilbut with a starting offset as peek-size. - peek_
input_ until_ with_ options - Same as
peek_input_untilbut with explicit control over the starting offset and the read-attempt budget. The predicate is evaluated against the prefilled prefix before reading.
Type Aliases§
- Peek
Prefixed Io PrefixedIoalias used byPeekRouter.