Struct arti_client::config::TorClientConfigBuilder
source ·
[−]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 the “default value” for a type. Read more
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for TorClientConfigBuilder
impl Send for TorClientConfigBuilder
impl Sync for TorClientConfigBuilder
impl Unpin for TorClientConfigBuilder
impl UnwindSafe for TorClientConfigBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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