pub struct NetworkConditions {
pub urlPattern: String,
pub latency: f64,
pub downloadThroughput: f64,
pub uploadThroughput: f64,
pub connectionType: Option<ConnectionType>,
pub packetLoss: Option<f64>,
pub packetQueueLength: Option<u64>,
pub packetReordering: Option<bool>,
pub offline: Option<bool>,
}Fields§
§urlPattern: StringOnly matching requests will be affected by these conditions. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are matched (including p2p connections).
latency: f64Minimum latency from request sent to response headers received (ms).
downloadThroughput: f64Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
uploadThroughput: f64Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
connectionType: Option<ConnectionType>Connection type if known.
packetLoss: Option<f64>WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
packetQueueLength: Option<u64>WebRTC packet queue length (packet). 0 removes any queue length limitations.
packetReordering: Option<bool>WebRTC packetReordering feature.
offline: Option<bool>True to emulate internet disconnection.
Trait Implementations§
Source§impl Clone for NetworkConditions
impl Clone for NetworkConditions
Source§fn clone(&self) -> NetworkConditions
fn clone(&self) -> NetworkConditions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more