pub struct MicrodescBuilder { /* private fields */ }
Expand description

A builder object used to construct a microdescriptor.

Create one of these with the Microdesc::builder method.

This facility is only enabled when the crate is built with the build_docs feature.

Implementations

Set the ntor onion key.

This key is required for a well-formed microdescriptor.

Set the ed25519 identity key.

This key is required for a well-formed microdescriptor.

Set the family of this relay.

By default, this family is empty.

Set the ipv4 exit policy of this relay.

By default, this policy is reject 1-65535.

Set the ipv6 exit policy of this relay.

By default, this policy is reject 1-65535.

Set the family of this relay based on parsing a string.

Set the ipv4 exit policy of this relay based on parsing a string.

By default, this policy is reject 1-65535.

Set the ipv6 exit policy of this relay based on parsing a string.

By default, this policy is reject 1-65535.

Try to build a microdescriptor from the settings on this builder.

Give an error if any required fields are not set.

Limitations

This is only for testing, since it does actually encode the information in a string, and since it sets the sha256 digest field at random.

In the future, when we have authority support, we’ll need an encoder function instead.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.