Module expect

Module expect 

Source
Expand description

Expect pattern matching module.

This module provides the core pattern matching functionality for expect operations, including pattern types, buffer management, regex caching, and match handling.

Structs§

CacheStats
Statistics about a regex cache.
CompiledRegex
A compiled regular expression with its source pattern.
ExpectState
State machine for async expect operations.
LargeBuffer
A large buffer backed by a temporary file.
MatchResult
Result of a pattern match.
Matcher
The pattern matching engine.
NamedPattern
A pattern with an optional name.
PatternBuilder
Builder for common before/after pattern configurations.
PatternManager
Manager for before/after patterns.
PatternMatch
Result of a successful pattern match.
PatternSet
A set of patterns for multi-pattern matching.
PersistentPattern
A persistent pattern with its handler.
RegexCache
A cache for compiled regular expressions.
RingBuffer
A ring buffer for accumulating terminal output.

Enums§

AdaptiveBuffer
Adaptive buffer that switches between in-memory and file-backed storage.
HandlerAction
Action to take after a pattern handler executes.
Pattern
A pattern that can be matched against terminal output.

Constants§

DEFAULT_CACHE_SIZE
Default maximum cache size.
DEFAULT_CAPACITY
Default buffer capacity (1 MB).
MMAP_THRESHOLD
Default threshold for switching to mmap buffer (10 MB).

Statics§

GLOBAL_CACHE
Global regex cache for shared use.

Functions§

get_regex
Get or compile a regex using the global cache.

Type Aliases§

PatternHandler
Handler function type for before/after patterns.