pub struct TrustStoreBuilderwhere
TrustStoreSettings: Describe,{ /* private fields */ }Expand description
Builds a TrustStore from its settings, filled in layers, and the inputs it takes. build lists everything still missing at once.
Implementations§
Source§impl TrustStoreBuilderwhere
Self: Holds<TrustStoreSettings>,
impl TrustStoreBuilderwhere
Self: Holds<TrustStoreSettings>,
Sourcepub fn waiting(self, value: impl Into<WaitingSettings>) -> Self
pub fn waiting(self, value: impl Into<WaitingSettings>) -> Self
The waiting queue: its limits, how sources are grouped and what a full source does.
Sourcepub fn rotation(self, value: impl Into<RotationOptions>) -> Self
pub fn rotation(self, value: impl Into<RotationOptions>) -> Self
How an accepted peer’s key is replaced by its successor.
Source§impl TrustStoreBuilderwhere
TrustStoreSettings: Describe,
impl TrustStoreBuilderwhere
TrustStoreSettings: Describe,
Sourcepub fn state_dir(self, value: impl Into<PathBuf>) -> Self
pub fn state_dir(self, value: impl Into<PathBuf>) -> Self
Sets the input state_dir; the last call wins.
Sourcepub fn fill(self, partial: Partial<TrustStoreSettings>) -> Self
pub fn fill(self, partial: Partial<TrustStoreSettings>) -> Self
Lays partial over what is set: only the keys it sets are taken, and the last
write of a key wins.
Sourcepub fn parts(self) -> Result<TrustStoreParts, Missing>
pub fn parts(self) -> Result<TrustStoreParts, Missing>
The parts: the settings built, every required input present and every optional input as given. A second terminal (one that builds a different value from the same parts) is written over this.
§Errors
Everything that is missing, at once: the same Missing
that build gives.
Sourcepub fn build(
self,
) -> Result<TrustStore, BuildError<<TrustStore as TryFrom<TrustStoreParts>>::Error>>
pub fn build( self, ) -> Result<TrustStore, BuildError<<TrustStore as TryFrom<TrustStoreParts>>::Error>>
The built value, or everything that is missing: every required setting and every required input, at once.
§Errors
What is missing, or for a fallible build the error of the conversion.
Source§impl TrustStoreBuilderwhere
TrustStoreSettings: Describe,
impl TrustStoreBuilderwhere
TrustStoreSettings: Describe,
Sourcepub fn non_defaults(&self) -> Vec<NonDefault>
pub fn non_defaults(&self) -> Vec<NonDefault>
Every setting that differs from its default, as the builder would build it.
Source§impl TrustStoreBuilder
impl TrustStoreBuilder
Sourcepub fn limits(self, limits: WaitingLimits) -> Self
pub fn limits(self, limits: WaitingLimits) -> Self
The bounds on the waiting queue. Default 16 per source, 1000 in all, 60 seconds.
Sourcepub fn ipv6_prefix(self, bits: u8) -> Self
pub fn ipv6_prefix(self, bits: u8) -> Self
Group IPv6 sources by their first bits bits for the per-source limits. Default 64. 128
counts each address alone, which lets the holder of a subnet fill the queue; values above
128 are 128. IPv4 sources, IPv4-mapped IPv6 ones included, always count per address.
Sourcepub fn when_full(self, when_full: WhenFull) -> Self
pub fn when_full(self, when_full: WhenFull) -> Self
What a newcomer to a full source gets. Default WhenFull::Refuse, so that strangers
sharing a source cannot flush those already waiting.
Sourcepub fn record_interval(self, interval: Duration) -> Self
pub fn record_interval(self, interval: Duration) -> Self
Record a new peer from one source at most once per interval, each record being a synced
write a stranger can cause. Default one second; zero is no limit.
Trait Implementations§
Source§impl Check<TrustStoreBuilder> for Profilewhere
TrustStoreSettings: Describe,
impl Check<TrustStoreBuilder> for Profilewhere
TrustStoreSettings: Describe,
Source§fn check(&self, subject: &TrustStoreBuilder, report: &mut Report)
fn check(&self, subject: &TrustStoreBuilder, report: &mut Report)
subject, pushing a Finding per expectation.Source§impl Configured for TrustStoreBuilderwhere
TrustStoreSettings: Describe,
impl Configured for TrustStoreBuilderwhere
TrustStoreSettings: Describe,
Source§type Settings = TrustStoreSettings
type Settings = TrustStoreSettings
Source§fn configured(&self) -> &dyn Inspect
fn configured(&self) -> &dyn Inspect
Inspect].