pub struct FallbackDirBuilder { /* private fields */ }Expand description
Builder for FallbackDir.
Implementations§
Source§impl FallbackDirBuilder
impl FallbackDirBuilder
Sourcepub fn rsa_identity(&mut self, value: RsaIdentity) -> &mut Self
pub fn rsa_identity(&mut self, value: RsaIdentity) -> &mut Self
RSA identity for the directory relay
Sourcepub fn ed_identity(&mut self, value: Ed25519Identity) -> &mut Self
pub fn ed_identity(&mut self, value: Ed25519Identity) -> &mut Self
Ed25519 identity for the directory relay
Source§impl FallbackDirBuilder
impl FallbackDirBuilder
Sourcepub fn orports(&mut self) -> &mut Vec<SocketAddr>
pub fn orports(&mut self) -> &mut Vec<SocketAddr>
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_orports(&mut self, list: Vec<SocketAddr>)
pub fn set_orports(&mut self, list: Vec<SocketAddr>)
Set the whole list (overriding the default)
Sourcepub fn opt_orports(&self) -> &Option<Vec<SocketAddr>>
pub fn opt_orports(&self) -> &Option<Vec<SocketAddr>>
Inspect the being-built list (with default unresolved)
If the list has not yet been set, or accessed, &None is returned.
Sourcepub fn opt_orports_mut(&mut self) -> &mut Option<Vec<SocketAddr>>
pub fn opt_orports_mut(&mut self) -> &mut Option<Vec<SocketAddr>>
Mutably access the being-built list (with default unresolved)
If the list has not yet been set, or accessed, &mut None is returned.
Source§impl FallbackDirBuilder
impl FallbackDirBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Make a new FallbackDirBuilder.
You only need to use this if you’re using a non-default set of fallback directories.
Sourcepub fn build(&self) -> Result<FallbackDir, ConfigBuildError>
pub fn build(&self) -> Result<FallbackDir, ConfigBuildError>
Builds a new FallbackDir.
§Errors
Errors unless both of rsa_identity, ed_identity, and at least one orport,
have been provided.
Trait Implementations§
Source§impl Builder for FallbackDirBuilder
impl Builder for FallbackDirBuilder
Source§type Built = FallbackDir
type Built = FallbackDir
Source§fn build(&self) -> Result<FallbackDir, ConfigBuildError>
fn build(&self) -> Result<FallbackDir, ConfigBuildError>
Built Read moreSource§impl Clone for FallbackDirBuilder
impl Clone for FallbackDirBuilder
Source§fn clone(&self) -> FallbackDirBuilder
fn clone(&self) -> FallbackDirBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FallbackDirBuilder
impl Debug for FallbackDirBuilder
Source§impl Default for FallbackDirBuilder
impl Default for FallbackDirBuilder
Source§impl<'de> Deserialize<'de> for FallbackDirBuilder
impl<'de> Deserialize<'de> for FallbackDirBuilder
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 FallbackDirBuilder
impl RefUnwindSafe for FallbackDirBuilder
impl Send for FallbackDirBuilder
impl Sync for FallbackDirBuilder
impl Unpin for FallbackDirBuilder
impl UnwindSafe for FallbackDirBuilder
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