pub struct EmulateNetworkConditionsByRuleParams<'a> { /* private fields */ }Expand description
Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated Network.emulateNetworkConditions this method does not affect ‘navigator’ state. Use Network.overrideNetworkState to explicitly modify ‘navigator’ behavior.
Implementations§
Source§impl<'a> EmulateNetworkConditionsByRuleParams<'a>
impl<'a> EmulateNetworkConditionsByRuleParams<'a>
Sourcepub fn builder(
matched_network_conditions: Vec<NetworkConditions<'a>>,
) -> EmulateNetworkConditionsByRuleParamsBuilder<'a>
pub fn builder( matched_network_conditions: Vec<NetworkConditions<'a>>, ) -> EmulateNetworkConditionsByRuleParamsBuilder<'a>
Creates a builder for this type with the required parameters:
matched_network_conditions: Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are also applied for throttling of p2p connections.
Sourcepub fn offline(&self) -> Option<bool>
pub fn offline(&self) -> Option<bool>
True to emulate internet disconnection. Deprecated, use the offline property in matchedNetworkConditions or emulateOfflineServiceWorker instead.
Sourcepub fn emulate_offline_service_worker(&self) -> Option<bool>
pub fn emulate_offline_service_worker(&self) -> Option<bool>
True to emulate offline service worker.
Sourcepub fn matched_network_conditions(&self) -> &[NetworkConditions<'a>]
pub fn matched_network_conditions(&self) -> &[NetworkConditions<'a>]
Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are also applied for throttling of p2p connections.
Trait Implementations§
Source§impl<'a> CdpCommand<'a> for EmulateNetworkConditionsByRuleParams<'a>
impl<'a> CdpCommand<'a> for EmulateNetworkConditionsByRuleParams<'a>
Source§impl<'a> Clone for EmulateNetworkConditionsByRuleParams<'a>
impl<'a> Clone for EmulateNetworkConditionsByRuleParams<'a>
Source§fn clone(&self) -> EmulateNetworkConditionsByRuleParams<'a>
fn clone(&self) -> EmulateNetworkConditionsByRuleParams<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more