pub struct BootstrapCacheConfigBuilder { /* private fields */ }Expand description
Builder for BootstrapCacheConfig
Implementations§
Source§impl BootstrapCacheConfigBuilder
impl BootstrapCacheConfigBuilder
Sourcepub fn epsilon(self, epsilon: f64) -> Self
pub fn epsilon(self, epsilon: f64) -> Self
Set epsilon for exploration rate (clamped to 0.0-1.0)
Sourcepub fn stale_threshold(self, duration: Duration) -> Self
pub fn stale_threshold(self, duration: Duration) -> Self
Set stale threshold duration
Sourcepub fn save_interval(self, duration: Duration) -> Self
pub fn save_interval(self, duration: Duration) -> Self
Set save interval
Sourcepub fn quality_update_interval(self, duration: Duration) -> Self
pub fn quality_update_interval(self, duration: Duration) -> Self
Set quality update interval
Sourcepub fn cleanup_interval(self, duration: Duration) -> Self
pub fn cleanup_interval(self, duration: Duration) -> Self
Set cleanup interval
Sourcepub fn min_peers_to_save(self, min: usize) -> Self
pub fn min_peers_to_save(self, min: usize) -> Self
Set minimum peers required to save
Sourcepub fn enable_file_locking(self, enable: bool) -> Self
pub fn enable_file_locking(self, enable: bool) -> Self
Enable or disable file locking
Sourcepub fn weights(self, weights: QualityWeights) -> Self
pub fn weights(self, weights: QualityWeights) -> Self
Set quality weights
Sourcepub fn build(self) -> BootstrapCacheConfig
pub fn build(self) -> BootstrapCacheConfig
Build the configuration
Trait Implementations§
Source§impl Default for BootstrapCacheConfigBuilder
impl Default for BootstrapCacheConfigBuilder
Source§fn default() -> BootstrapCacheConfigBuilder
fn default() -> BootstrapCacheConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BootstrapCacheConfigBuilder
impl RefUnwindSafe for BootstrapCacheConfigBuilder
impl Send for BootstrapCacheConfigBuilder
impl Sync for BootstrapCacheConfigBuilder
impl Unpin for BootstrapCacheConfigBuilder
impl UnwindSafe for BootstrapCacheConfigBuilder
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
Mutably borrows from an owned value. Read more