Why aren't you just using a single type parameter S?
As a side note, depending on your usage, you might want to look into using AsRef<str>.
(e) Oh, ok, I see why you'd want to use several parameters. I don't think there's a better way if you need this flexibility and don't want to go into dynamic dispatch.
If you don't mind needlessly copying a String, you could do something like this Rust Playground. I just have to admit that I'm now having trouble making it work with a 2nd argument to put a String into, here's what I had in mind: Rust Playground. Maybe someone else can chime in how to do this correctly.
Truth be told though, even if that works, I'd just keep your original version.