From my searching, It looks like
IntoUrl was removed from hyper at some point. I gave a talk on the various naming conventions in Rust (see slide 12). From what I have seen,
Into related traits normally does not require allocation and does not have an error variant. Instead,
Into normally consumes a type and turns it into another type.
The advantage of using
Into related traits is that it allows you to create a function that can accept multiple types. For example, you can create a function that accepts a
String or a
&str. This makes your code more ergonomic to the user, but has the downside of making your code a little more complex.
In the case of
Url, you are right to identify that errors have to be handled. I think is odd to create a function that has to both fulfill its intended purpose while also dealing with the possible errors of converting a
&String to a