pub struct NetworkPreset {Show 17 fields
pub network: NetworkConfig,
pub quic: QuicConfig,
pub dht: DhtConfig,
pub peer_store: PeerStoreConfig,
pub connection_limits: ConnectionLimitsConfig,
pub throttle: Option<ThrottleConfig>,
pub adaptive_polling: Option<AdaptivePollingConfig>,
pub memory_monitor: Option<MemoryMonitorConfig>,
pub offline_queue: Option<OfflineQueueConfig>,
pub background_mode: Option<BackgroundModeConfig>,
pub query_batcher: Option<QueryBatcherConfig>,
pub geo_router: Option<GeoRouterConfig>,
pub quality_predictor: Option<QualityPredictorConfig>,
pub peer_selector: Option<PeerSelectorConfig>,
pub multipath: Option<MultipathConfig>,
pub tor: Option<TorConfig>,
pub description: String,
}Expand description
Complete network configuration preset
Fields§
§network: NetworkConfigCore network configuration
quic: QuicConfigQUIC transport configuration
dht: DhtConfigDHT configuration
peer_store: PeerStoreConfigPeer store configuration
connection_limits: ConnectionLimitsConfigConnection limits
throttle: Option<ThrottleConfig>Bandwidth throttling
adaptive_polling: Option<AdaptivePollingConfig>Adaptive polling
memory_monitor: Option<MemoryMonitorConfig>Memory monitoring
offline_queue: Option<OfflineQueueConfig>Offline queue
background_mode: Option<BackgroundModeConfig>Background mode
query_batcher: Option<QueryBatcherConfig>Query batching
geo_router: Option<GeoRouterConfig>Geographic routing
quality_predictor: Option<QualityPredictorConfig>Quality prediction
peer_selector: Option<PeerSelectorConfig>Peer selection
multipath: Option<MultipathConfig>Multipath QUIC
tor: Option<TorConfig>Tor configuration
description: StringPreset description
Implementations§
Source§impl NetworkPreset
impl NetworkPreset
Sourcepub fn default_preset() -> Self
pub fn default_preset() -> Self
Default preset - balanced configuration for general use
Sourcepub fn low_memory() -> Self
pub fn low_memory() -> Self
Low memory preset - optimized for devices with < 128 MB RAM
Sourcepub fn high_performance() -> Self
pub fn high_performance() -> Self
High performance preset - servers and desktops with ample resources
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Low latency preset - gaming, real-time communications
Sourcepub fn high_throughput() -> Self
pub fn high_throughput() -> Self
High throughput preset - file transfers, video streaming
Sourcepub fn development() -> Self
pub fn development() -> Self
Development preset - convenient settings for testing and development
Sourcepub fn has_throttling(&self) -> bool
pub fn has_throttling(&self) -> bool
Check if throttling is enabled
Sourcepub fn has_adaptive_polling(&self) -> bool
pub fn has_adaptive_polling(&self) -> bool
Check if adaptive polling is enabled
Sourcepub fn has_memory_monitoring(&self) -> bool
pub fn has_memory_monitoring(&self) -> bool
Check if memory monitoring is enabled
Sourcepub fn has_offline_queue(&self) -> bool
pub fn has_offline_queue(&self) -> bool
Check if offline queue is enabled
Sourcepub fn features_summary(&self) -> Vec<String>
pub fn features_summary(&self) -> Vec<String>
Get a summary of enabled features
Trait Implementations§
Source§impl Clone for NetworkPreset
impl Clone for NetworkPreset
Source§fn clone(&self) -> NetworkPreset
fn clone(&self) -> NetworkPreset
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NetworkPreset
impl Debug for NetworkPreset
Auto Trait Implementations§
impl Freeze for NetworkPreset
impl RefUnwindSafe for NetworkPreset
impl Send for NetworkPreset
impl Sync for NetworkPreset
impl Unpin for NetworkPreset
impl UnwindSafe for NetworkPreset
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