pub struct EmulateNetworkConditionsParams { /* private fields */ }Expand description
Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule and overrideNetworkState commands, which can be used together to the same effect.
Implementations§
Source§impl EmulateNetworkConditionsParams
impl EmulateNetworkConditionsParams
Sourcepub fn builder(
offline: bool,
latency: f64,
download_throughput: f64,
upload_throughput: f64,
) -> EmulateNetworkConditionsParamsBuilder
pub fn builder( offline: bool, latency: f64, download_throughput: f64, upload_throughput: f64, ) -> EmulateNetworkConditionsParamsBuilder
Creates a builder for this type with the required parameters:
offline: True to emulate internet disconnection.latency: Minimum latency from request sent to response headers received (ms).download_throughput: Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.upload_throughput: Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
Sourcepub fn latency(&self) -> f64
pub fn latency(&self) -> f64
Minimum latency from request sent to response headers received (ms).
Sourcepub fn download_throughput(&self) -> f64
pub fn download_throughput(&self) -> f64
Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
Sourcepub fn upload_throughput(&self) -> f64
pub fn upload_throughput(&self) -> f64
Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
Sourcepub fn connection_type(&self) -> Option<&ConnectionType>
pub fn connection_type(&self) -> Option<&ConnectionType>
Connection type if known.
Sourcepub fn packet_loss(&self) -> Option<f64>
pub fn packet_loss(&self) -> Option<f64>
WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
Sourcepub fn packet_queue_length(&self) -> Option<u64>
pub fn packet_queue_length(&self) -> Option<u64>
WebRTC packet queue length (packet). 0 removes any queue length limitations.
Sourcepub fn packet_reordering(&self) -> Option<bool>
pub fn packet_reordering(&self) -> Option<bool>
WebRTC packetReordering feature.
Trait Implementations§
Source§impl<'a> CdpCommand<'a> for EmulateNetworkConditionsParams
impl<'a> CdpCommand<'a> for EmulateNetworkConditionsParams
Source§impl Clone for EmulateNetworkConditionsParams
impl Clone for EmulateNetworkConditionsParams
Source§fn clone(&self) -> EmulateNetworkConditionsParams
fn clone(&self) -> EmulateNetworkConditionsParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for EmulateNetworkConditionsParams
impl Default for EmulateNetworkConditionsParams
Source§fn default() -> EmulateNetworkConditionsParams
fn default() -> EmulateNetworkConditionsParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EmulateNetworkConditionsParams
impl<'de> Deserialize<'de> for EmulateNetworkConditionsParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EmulateNetworkConditionsParams
impl RefUnwindSafe for EmulateNetworkConditionsParams
impl Send for EmulateNetworkConditionsParams
impl Sync for EmulateNetworkConditionsParams
impl Unpin for EmulateNetworkConditionsParams
impl UnsafeUnpin for EmulateNetworkConditionsParams
impl UnwindSafe for EmulateNetworkConditionsParams
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