pub struct NetworkConfigBuilder { /* private fields */ }Expand description
Builder for NetworkConfig.
Implementations§
Source§impl NetworkConfigBuilder
impl NetworkConfigBuilder
List of directory authorities which we expect to perform various operations affecting the overall Tor network.
(If none are specified, we use a default list of authorities shipped with Arti.)
This section cannot be changed in a running Arti client.
The default is to use a set of compiled-in authorities, whose identities and public keys are shipped as part of the Arti source code.
Sourcepub fn build(&self) -> Result<NetworkConfig, ConfigBuildError>
pub fn build(&self) -> Result<NetworkConfig, ConfigBuildError>
Source§impl NetworkConfigBuilder
impl NetworkConfigBuilder
Sourcepub fn fallback_caches(&mut self) -> &mut Vec<FallbackDirBuilder>
pub fn fallback_caches(&mut self) -> &mut Vec<FallbackDirBuilder>
Access the being-built list (resolving default)
If the field has not yet been set or accessed, the default list will be constructed and a mutable reference to the now-defaulted list of builders will be returned.
Sourcepub fn set_fallback_caches(&mut self, list: Vec<FallbackDirBuilder>)
pub fn set_fallback_caches(&mut self, list: Vec<FallbackDirBuilder>)
Set the whole list (overriding the default)
Sourcepub fn opt_fallback_caches(&self) -> &Option<Vec<FallbackDirBuilder>>
pub fn opt_fallback_caches(&self) -> &Option<Vec<FallbackDirBuilder>>
Inspect the being-built list (with default unresolved)
If the list has not yet been set, or accessed, &None is returned.
Sourcepub fn opt_fallback_caches_mut(
&mut self,
) -> &mut Option<Vec<FallbackDirBuilder>>
pub fn opt_fallback_caches_mut( &mut self, ) -> &mut Option<Vec<FallbackDirBuilder>>
Mutably access the being-built list (with default unresolved)
If the list has not yet been set, or accessed, &mut None is returned.
Trait Implementations§
Source§impl Builder for NetworkConfigBuilder
impl Builder for NetworkConfigBuilder
Source§type Built = NetworkConfig
type Built = NetworkConfig
Source§fn build(&self) -> Result<NetworkConfig, ConfigBuildError>
fn build(&self) -> Result<NetworkConfig, ConfigBuildError>
Built Read moreSource§impl Clone for NetworkConfigBuilder
impl Clone for NetworkConfigBuilder
Source§fn clone(&self) -> NetworkConfigBuilder
fn clone(&self) -> NetworkConfigBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NetworkConfigBuilder
impl Debug for NetworkConfigBuilder
Source§impl Default for NetworkConfigBuilder
impl Default for NetworkConfigBuilder
Source§impl<'de> Deserialize<'de> for NetworkConfigBuilder
impl<'de> Deserialize<'de> for NetworkConfigBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for NetworkConfigBuilder
impl RefUnwindSafe for NetworkConfigBuilder
impl Send for NetworkConfigBuilder
impl Sync for NetworkConfigBuilder
impl Unpin for NetworkConfigBuilder
impl UnwindSafe for NetworkConfigBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more