1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Native scan match result.
//!
//! Scanning engines (DFA, Aho-Corasick, substring search) return `Match`
//! values to report where a pattern hit the input. This type is deliberately
//! minimal — just pattern ID and byte range — so that backends can return
//! matches with zero allocation overhead and consumers can interpret the
//! result without knowing the engine that produced it.
/// A byte-range match emitted by vyre scanning engines.
///
/// `Match` is the universal return type for every pattern-matching op in
/// vyre. It carries exactly the information a consumer needs to locate the
/// hit in the original input: the pattern that matched and the half-open
/// byte interval. The struct is `#[non_exhaustive]` so that future fields
/// (for example capture group indices) can be added without breaking the
/// frozen public API.