pub struct ConsensusBuilder<RS> { /* private fields */ }
Expand description

A builder object used to construct a consensus.

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

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

Implementations

Set the lifetime of this consensus.

This value is required.

Add a single recommended Tor client version to this consensus.

These values are optional for testing.

Add a single recommended Tor relay version to this consensus.

These values are optional for testing.

Set the required client protocol versions for this consensus.

This value defaults to “no protocol versions required.”

Set the recommended client protocol versions for this consensus.

This value defaults to “no protocol versions recommended.”

Set the required relay protocol versions for this consensus.

This value defaults to “no protocol versions required.”

Set the recommended client protocol versions for this consensus.

This value defaults to “no protocol versions recommended.”

Set the value for a given consensus parameter by name.

Set the voting delays (in seconds) for this consensus.

Set the declared consensus method for this consensus.

This value is required.

Set the previous day’s shared-random value for this consensus.

This value is optional.

Set the current day’s shared-random value for this consensus.

This value is optional.

Set a named weight parameter for this consensus.

Replace all weight parameters for this consensus.

Create a VoterInfoBuilder to add a voter to this builder.

In theory these are required, but nothing asks for them.

Create a RouterStatusBuilder to add a RouterStatus to this builder.

You can make a consensus with no RouterStatus entries, but it won’t actually be good for anything.

Try to create a consensus object from this builder.

This object might not have all of the data that a valid consensus would have. Therefore, it should only be used for testing.

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 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.