My Favorite Rust Function Signature
Tokenizers usually need to retain some information about where each token came from, like the range in the source.In C++ I might do it like this:    struct token {
        string::iterator start;
        string::iterator end;
    };

and then the range in the original source can be recovered via:    size_t offset = tok.start - src.begin();

What is the preferred way to do this in Rust? Is there something better than using indexes?Rust doesn't appear to have a way to say "give me the location of this &str in that &str" (even though it seems like it would be safe).