Skip to main content

Module peek

Module peek 

Available on crate feature std only.

Structs§

PeekOutput
Result of a peek_input_until call.
PeekRouter
A generic Service router driven by a fail-fast PeekVerdict predicate.
PeekTimeoutError
protocol peek timed out before reaching a definitive verdict

Enums§

PeekStopReason
Reason a protocol peek operation stopped.
PeekTimeoutPolicy
Policy applied when protocol peeking reaches its configured timeout before a definitive match or rejection.
PeekVerdict
Verdict returned by a fail-fast peek predicate, used with peek_input_until_verdict and peek_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 buffer until predicate matches, peeking stops, or the optional timeout expires.
peek_input_until_verdict
Fail-fast variant of peek_input_until using a PeekVerdict predicate.
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 like peek_input_until_verdict_with_options.
peek_input_until_verdict_growing_with_output
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.
peek_input_until_verdict_with_options
Same as peek_input_until_with_options but with a fail-fast three-way PeekVerdict predicate. This is the core peek loop; the Option-based helpers are thin wrappers that never reject.
peek_input_until_with_offset
Same as peek_input_until but with a starting offset as peek-size.
peek_input_until_with_options
Same as peek_input_until but with explicit control over the starting offset and the read-attempt budget. The predicate is evaluated against the prefilled prefix before reading.

Type Aliases§

PeekPrefixedIo
PrefixedIo alias used by PeekRouter.