Currently the Replacer trait returns a string. If you have complicated replacement logic, there is a decent chance that you want to be able to return a Result or an Option instead, with short circuiting behavior. The API would basically be to add try variants of replace_all and replacen and a new FallibleReplacer trait with an associated Error type.