pub struct NetworkConfigBuilder { /* private fields */ }Expand description
A builder to create an instance of NetworkConfig.
Implementations§
Source§impl NetworkConfigBuilder
impl NetworkConfigBuilder
Return a mutable reference to the inner builder for authorities.
§authorities
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.
Source§impl NetworkConfigBuilder
impl NetworkConfigBuilder
Sourcepub fn build(&self) -> Result<NetworkConfig, ConfigBuildError>
pub fn build(&self) -> Result<NetworkConfig, ConfigBuildError>
Try to construct a new NetworkConfig from the fields set in this builder.
Return an error if any required field is missing, or is set to something invalid.
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§fn default() -> NetworkConfigBuilder
fn default() -> 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>,
Source§impl ExtendBuilder for NetworkConfigBuilder
impl ExtendBuilder for NetworkConfigBuilder
Source§fn extend_from(&mut self, other: Self, strategy: ExtendStrategy)
fn extend_from(&mut self, other: Self, strategy: ExtendStrategy)
Source§impl Flattenable for NetworkConfigBuilder
impl Flattenable for NetworkConfigBuilder
Auto Trait Implementations§
impl Freeze for NetworkConfigBuilder
impl RefUnwindSafe for NetworkConfigBuilder
impl Send for NetworkConfigBuilder
impl Sync for NetworkConfigBuilder
impl Unpin for NetworkConfigBuilder
impl UnsafeUnpin 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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§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.Source§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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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