Add builder for encoding hidden service descriptors.
-
Add builder for encoding hidden service descriptors.
This introduces the
NetdocBuildertrait described innetdoc-builder.mdand a newtor-netdoc::doc::hsdesc::buildmodule, which exports theHsDescBuilder. Hidden services will useHsDescBuilderto 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
AuthClientfield 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
ItemArgumentforString.This makes some code a bit more concise, as it allows us to make
StringsintoItemArguments without calling.as_str().