Struct arti_client::config::TorClientConfig
source · [−]#[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
sourceimpl TorClientConfig
impl TorClientConfig
sourcepub fn builder() -> TorClientConfigBuilder
pub fn builder() -> TorClientConfigBuilder
Returns a fresh, default, builder
sourceimpl TorClientConfig
impl TorClientConfig
sourcepub fn fs_mistrust(&self) -> &Mistrust
pub fn fs_mistrust(&self) -> &Mistrust
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
sourceimpl AsRef<CircuitTiming> for TorClientConfig
impl AsRef<CircuitTiming> for TorClientConfig
sourcefn as_ref(&self) -> &CircuitTiming
fn as_ref(&self) -> &CircuitTiming
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl AsRef<FallbackList> for TorClientConfig
impl AsRef<FallbackList> for TorClientConfig
sourcefn as_ref(&self) -> &FallbackList
fn as_ref(&self) -> &FallbackList
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl AsRef<PathConfig> for TorClientConfig
impl AsRef<PathConfig> for TorClientConfig
sourcefn as_ref(&self) -> &PathConfig
fn as_ref(&self) -> &PathConfig
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl AsRef<PreemptiveCircuitConfig> for TorClientConfig
impl AsRef<PreemptiveCircuitConfig> for TorClientConfig
sourcefn as_ref(&self) -> &PreemptiveCircuitConfig
fn as_ref(&self) -> &PreemptiveCircuitConfig
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl CircMgrConfig for TorClientConfig
impl CircMgrConfig for TorClientConfig
sourcefn path_rules(&self) -> &PathConfig
fn path_rules(&self) -> &PathConfig
Access the field
sourcefn circuit_timing(&self) -> &CircuitTiming
fn circuit_timing(&self) -> &CircuitTiming
Access the field
sourcefn preemptive_circuits(&self) -> &PreemptiveCircuitConfig
fn preemptive_circuits(&self) -> &PreemptiveCircuitConfig
Access the field
sourcefn fallbacks(&self) -> &FallbackList
fn fallbacks(&self) -> &FallbackList
Access the field
sourceimpl Clone for TorClientConfig
impl Clone for TorClientConfig
sourcefn clone(&self) -> TorClientConfig
fn clone(&self) -> TorClientConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TorClientConfig
impl Debug for TorClientConfig
sourceimpl Default for TorClientConfig
impl Default for TorClientConfig
sourceimpl PartialEq<TorClientConfig> for TorClientConfig
impl PartialEq<TorClientConfig> for TorClientConfig
sourcefn eq(&self, other: &TorClientConfig) -> bool
fn eq(&self, other: &TorClientConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TorClientConfig) -> bool
fn ne(&self, other: &TorClientConfig) -> bool
This method tests for !=
.
sourceimpl TopLevel for TorClientConfig
impl TopLevel for TorClientConfig
type Builder = TorClientConfigBuilder
type Builder = TorClientConfigBuilder
The Builder
which can be used to make a Self
Read more
impl Eq for TorClientConfig
impl StructuralEq for TorClientConfig
impl StructuralPartialEq for TorClientConfig
Auto Trait Implementations
impl RefUnwindSafe for TorClientConfig
impl Send for TorClientConfig
impl Sync for TorClientConfig
impl Unpin for TorClientConfig
impl UnwindSafe for TorClientConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more