tor-linkspec: Refactor HasAddrs, HasChanMethods, and Owned* objects
This is a hefty diff, but a fairly simple (I hope) set of changes.
-
HasAddrs
now represents something that has an address, not necessarily something that can be connected to at that address. ("Having" an address is relevant for family decisions and geoip.) -
HasChannelMethods
now represents something that we can open a channel to in some way, either with TLS-over-TCP or a pluggable transport. It is now a required supertrait forChanTarget
. - The
OwnedChanTarget
,OwnedCircTarget
, andRelayIds
types now have builders instead ofnew
functions. (Their constructors were marked for removal, and had proven to be unstable.)- (This last part required a bunch of other code to change)
-
tor_proto::Channel
now keeps track of theChannelMethods
it was asked to connect to, not the address. - Our
HasAddr
users, where appropriate, now useChannelMethod::Direct
instead.
@Diziet @eta since this involves API changes in key tor-linkspec
traits, I'd like both of your feedback on that part before I merge.