pub struct BackgroundModeConfig {
pub pause_dht_queries: bool,
pub pause_provider_announcements: bool,
pub close_idle_connections: bool,
pub idle_connection_threshold: Duration,
pub keep_minimal_connections: bool,
pub minimal_connection_count: usize,
pub reduce_dht_frequency: bool,
pub background_dht_interval: Duration,
}Expand description
Configuration for background mode behavior
Fields§
§pause_dht_queries: boolWhether to pause DHT queries in background
pause_provider_announcements: boolWhether to pause provider announcements in background
close_idle_connections: boolWhether to close idle connections when entering background
idle_connection_threshold: DurationMinimum connection age to be considered for closing (when close_idle_connections is true)
keep_minimal_connections: boolWhether to maintain a minimal set of connections in background
minimal_connection_count: usizeNumber of connections to keep when in background mode
reduce_dht_frequency: boolWhether to reduce DHT query frequency in background
background_dht_interval: DurationDHT query interval when in background (if reduce_dht_frequency is true)
Implementations§
Trait Implementations§
Source§impl Clone for BackgroundModeConfig
impl Clone for BackgroundModeConfig
Source§fn clone(&self) -> BackgroundModeConfig
fn clone(&self) -> BackgroundModeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackgroundModeConfig
impl Debug for BackgroundModeConfig
Auto Trait Implementations§
impl Freeze for BackgroundModeConfig
impl RefUnwindSafe for BackgroundModeConfig
impl Send for BackgroundModeConfig
impl Sync for BackgroundModeConfig
impl Unpin for BackgroundModeConfig
impl UnwindSafe for BackgroundModeConfig
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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