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§
- Cache
Stats - Statistics about a regex cache.
- Compiled
Regex - A compiled regular expression with its source pattern.
- Expect
State - State machine for async expect operations.
- Large
Buffer - A large buffer backed by a temporary file.
- Match
Result - Result of a pattern match.
- Matcher
- The pattern matching engine.
- Named
Pattern - A pattern with an optional name.
- Pattern
Builder - Builder for common before/after pattern configurations.
- Pattern
Manager - Manager for before/after patterns.
- Pattern
Match - Result of a successful pattern match.
- Pattern
Set - A set of patterns for multi-pattern matching.
- Persistent
Pattern - A persistent pattern with its handler.
- Regex
Cache - A cache for compiled regular expressions.
- Ring
Buffer - A ring buffer for accumulating terminal output.
Enums§
- Adaptive
Buffer - Adaptive buffer that switches between in-memory and file-backed storage.
- Handler
Action - 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§
- Pattern
Handler - Handler function type for before/after patterns.