Instead of taking &[&str], this refactors most path parameters to take impl Iterator<Item = impl AsRef<str>>. This should make it possible to pass owned containers (e.g. Vecs or arrays), including those containing owned Strings.
While this seems to be the suggested approach for passing strings generically, it significantly impairs readability and introduces some ambiguities when passing empty paths (previously &[] would have been accepted, which is now ambiguous due to the generic impl AsRef<str>).
Draft PR for now until we figure out a more acceptable tradeoff.
Instead of taking
&[&str]
, this refactors most path parameters to takeimpl Iterator<Item = impl AsRef<str>>
. This should make it possible to pass owned containers (e.g.Vec
s or arrays), including those containing ownedString
s.While this seems to be the suggested approach for passing strings generically, it significantly impairs readability and introduces some ambiguities when passing empty paths (previously
&[]
would have been accepted, which is now ambiguous due to the genericimpl AsRef<str>
).Draft PR for now until we figure out a more acceptable tradeoff.