Provide more API and documentation for AddrPortPattern
On !583 (comment 2812677) @Diziet says:
Now that you're using
AddrPortPattern
outside its original context intor_netdoc
, I think it needs some work:
- It doesn't seem to have a public constructor other than its
FromStr
.- The textual syntax isn't documented within arti. Presumably it is in the Tor spec - I didn't look. I think we ought to document our own syntaxes.
- You've made it
Deserialize
using the string representation. I think this is a fine idea but it should be documented.- Looking inside it at the
IpPattern
enum I think theV4Star
andV6Star
patterns are redundant, but perhaps this is an optimisation?