I want to see how many characters the regex has looked at before it succeeds or fails (to support incrementally re-lexing something). I haven't noticed a direct way to do this in the Rust regex library's API.
If I could somehow intercept the &str I give to library, I could record the furthest character it's had to observe. I'm not sure how to do this, as I am new to Rust. If this were Java, I would use a proxy/implement CharSequence.
Bonus points if it works with RegexSet.