Checking for words in a string is easy with the str::contains
method.
As for writing a parser itself, I don't think it's any different in Rust than other languages. You have to create some sort of state machine.
For examples, you could check out serialize::json
. I also wrote a CSV parser that uses a buffer with a convenient read_char
method. The advantage of using this approach is that you don't need to load the whole input into memory at once.