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
.
Implementations§
source§impl TorClientConfig
impl TorClientConfig
sourcepub fn builder() -> TorClientConfigBuilder
pub fn builder() -> TorClientConfigBuilder
Returns a fresh, default, builder
source§impl 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§
source§impl AsRef<[BridgeConfig]> for TorClientConfig
impl AsRef<[BridgeConfig]> for TorClientConfig
source§fn as_ref(&self) -> &[BridgeConfig]
fn as_ref(&self) -> &[BridgeConfig]
source§impl AsRef<CircuitTiming> for TorClientConfig
impl AsRef<CircuitTiming> for TorClientConfig
source§fn as_ref(&self) -> &CircuitTiming
fn as_ref(&self) -> &CircuitTiming
source§impl AsRef<FallbackList> for TorClientConfig
impl AsRef<FallbackList> for TorClientConfig
source§fn as_ref(&self) -> &FallbackList
fn as_ref(&self) -> &FallbackList
source§impl AsRef<PathConfig> for TorClientConfig
impl AsRef<PathConfig> for TorClientConfig
source§fn as_ref(&self) -> &PathConfig
fn as_ref(&self) -> &PathConfig
source§impl AsRef<PreemptiveCircuitConfig> for TorClientConfig
impl AsRef<PreemptiveCircuitConfig> for TorClientConfig
source§fn as_ref(&self) -> &PreemptiveCircuitConfig
fn as_ref(&self) -> &PreemptiveCircuitConfig
source§impl CircMgrConfig for TorClientConfig
impl CircMgrConfig for TorClientConfig
source§fn path_rules(&self) -> &PathConfig
fn path_rules(&self) -> &PathConfig
source§fn circuit_timing(&self) -> &CircuitTiming
fn circuit_timing(&self) -> &CircuitTiming
source§fn preemptive_circuits(&self) -> &PreemptiveCircuitConfig
fn preemptive_circuits(&self) -> &PreemptiveCircuitConfig
source§impl Clone for TorClientConfig
impl Clone for TorClientConfig
source§fn clone(&self) -> TorClientConfig
fn clone(&self) -> TorClientConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TorClientConfig
impl Debug for TorClientConfig
source§impl Default for TorClientConfig
impl Default for TorClientConfig
source§impl GuardMgrConfig for TorClientConfig
impl GuardMgrConfig for TorClientConfig
source§fn bridges_enabled(&self) -> bool
fn bridges_enabled(&self) -> bool
source§fn fallbacks(&self) -> &FallbackList
fn fallbacks(&self) -> &FallbackList
source§fn bridges(&self) -> &[BridgeConfig]
fn bridges(&self) -> &[BridgeConfig]
source§impl HsClientConnectorConfig for TorClientConfig
Available on crate feature onion-service-client
only.
impl HsClientConnectorConfig for TorClientConfig
onion-service-client
only.source§fn circuit_timing(&self) -> &CircuitTiming
fn circuit_timing(&self) -> &CircuitTiming
source§impl PartialEq<TorClientConfig> for TorClientConfig
impl PartialEq<TorClientConfig> for TorClientConfig
source§fn eq(&self, other: &TorClientConfig) -> bool
fn eq(&self, other: &TorClientConfig) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl TopLevel for TorClientConfig
impl TopLevel for TorClientConfig
§type Builder = TorClientConfigBuilder
type Builder = TorClientConfigBuilder
source§const DEPRECATED_KEYS: &'static [&'static str] = _
const DEPRECATED_KEYS: &'static [&'static str] = _
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
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
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.