You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #173, which is now in master, we added a Port<'a>, which includes not only the u16 port number, but also the &str of the port. This allows efficiently asking for the "port" part of a Uri as a string, without needing to get a u16 and allocate a newString by calling port_num.to_string().
In #219, also in master, a uri::Builder was introduced. The idea is to allow for easily building up a Uri from fallible parts. It seems like it could be nice to add a port setter, which takes a generic P where Port: HttpTryFrom<P>. This would allow a user to pass a u16, a &str, or a Port from a different Uri.
However, with Port<'a>, adding this API to uri::Builder would be impossible. So, should Port<'a> be renamed to something else? It'd be useful to find other precedents, but until they are found and listed, if renaming is desired, some possible names are:
PortRef<'a>
PortSlice<'a>
PortPart<'a>
As this type isn't released yet (only on master), and it affects whether we can add to the uri::Builder API, I believe finding an answer should block releasing v0.1.14.
The text was updated successfully, but these errors were encountered:
In #173, which is now in master, we added a
Port<'a>
, which includes not only theu16
port number, but also the&str
of the port. This allows efficiently asking for the "port" part of aUri
as a string, without needing to get au16
and allocate a newString
by callingport_num.to_string()
.In #219, also in master, a
uri::Builder
was introduced. The idea is to allow for easily building up aUri
from fallible parts. It seems like it could be nice to add aport
setter, which takes a genericP where Port: HttpTryFrom<P>
. This would allow a user to pass au16
, a&str
, or aPort
from a differentUri
.However, with
Port<'a>
, adding this API touri::Builder
would be impossible. So, shouldPort<'a>
be renamed to something else? It'd be useful to find other precedents, but until they are found and listed, if renaming is desired, some possible names are:PortRef<'a>
PortSlice<'a>
PortPart<'a>
As this type isn't released yet (only on master), and it affects whether we can add to the
uri::Builder
API, I believe finding an answer should block releasing v0.1.14.The text was updated successfully, but these errors were encountered: