Add builder for encoding hidden service descriptors.
-
Add builder for encoding hidden service descriptors.
This introduces the
NetdocBuilder
trait described innetdoc-builder.md
and a newtor-netdoc::doc::hsdesc::build
module, which exports theHsDescBuilder
. Hidden services will useHsDescBuilder
to build and encode hidden service descriptors.There are several TODOs in the code that I'm planning to address separately.
Partially addresses #745 (closed).
-
Define constants for
AuthClient
field lengths.These are used in multiple places (and will also be used by the HS descriptor encoder later on), so let's make them named constants.
-
Implement
ItemArgument
forString
.This makes some code a bit more concise, as it allows us to make
Strings
intoItemArgument
s without calling.as_str()
.