#[non_exhaustive]
pub struct TorClientConfig { /* private fields */ }
Expand description

A configuration used to bootstrap a TorClient.

In order to connect to the Tor network, Arti needs to know a few well-known directory caches on the network, and the public keys of the network’s directory authorities. It also needs a place on disk to store persistent state and cached directory information. (See StorageConfig for default directories.)

Most users will create a TorClientConfig by running TorClientConfig::default.

If you need to override the locations where Arti stores its information, you can make a TorClientConfig with TorClientConfigBuilder::from_directories.

Finally, you can get fine-grained control over the members of a a TorClientConfig using TorClientConfigBuilder.

⚠ Stability Warning ⚠

The design of this structure, and of the configuration system for Arti, is likely to change significantly before the release of Arti 1.0.0. The layout of options within this structure is also likely to change. For more information see ticket #285.

Implementations

Returns a fresh, default, builder

Return a reference to the fs_mistrust::Mistrust object that we’ll use to check permissions on files and directories by default.

Usage notes

In the future, specific files or directories may have stricter or looser permissions checks applied to them than this default. Callers shouldn’t use this Mistrust to predict what Arti will accept for a specific file or directory. Rather, you should use this if you have some file or directory of your own on which you’d like to enforce the same rules as Arti uses.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Access the field

Access the field

Access the field

Access the field

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

The Builder which can be used to make a Self Read more

Deprecated config keys, as “.”-separates strings

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

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

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

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