pub struct TorClientConfigBuilder { /* fields omitted */ }
Expand description

Builder object used to construct a TorClientConfig.

Unlike other builder types in Arti, this builder works by exposing an inner builder for each section in the TorClientConfig.

Implementations

Construct a TorClientConfig from this builder.

Returns a TorClientConfigBuilder using the specified state and cache directories.

All other configuration options are set to their defaults.

Return a mutable reference to a NetworkConfigBuilder to use in configuring the underlying Tor network.

Most programs shouldn’t need to alter this configuration: it’s only for cases when you need to use a nonstandard set of Tor directory authorities and fallback caches.

Return a mutable reference to a StorageConfigBuilder.

This section is used to configure the locations where Arti should store files on disk.

Return a mutable reference to a DownloadScheduleConfigBuilder.

This section is used to override Arti’s schedule when attempting and retrying to download directory objects.

Return a mutable reference to a HashMap of network parameters that should be used to override those specified in the consensus directory.

This section should not usually be used for anything but testing: if you find yourself needing to configure an override here for production use, please consider opening a feature request for it instead.

For a complete list of Tor’s defined network parameters (not all of which are yet supported by Arti), see path-spec.txt.

Return a mutable reference to a PathConfigBuilder.

This section is used to override Arti’s rules for selecting which relays should be used in a given circuit.

Return a mutable reference to a PreemptiveCircuitConfigBuilder.

This section overrides Arti’s rules for preemptive circuits.

Return a mutable reference to a CircuitTimingBuilder.

This section overrides Arti’s rules for deciding how long to use circuits, and when to give up on attempts to launch them.

Return a mutable reference to a StreamTimeoutConfigBuilder.

This section overrides Arti’s rules for deciding how long a stream request (that is, an attempt to connect or resolve) should wait for a response before deciding that the stream has timed out.

Return a mutable reference to a ClientAddrConfigBuilder.

This section controls which addresses Arti is willing to launch connections to over the Tor network. Any addresses rejected by this section cause stream attempts to fail before any traffic is sent over the network.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more