pub struct OverrideNetworkStateBuilder { /* private fields */ }Expand description
Builder for OverrideNetworkState.
Implementations§
Source§impl OverrideNetworkStateBuilder
impl OverrideNetworkStateBuilder
Sourcepub fn offline<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn offline<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
True to emulate internet disconnection.
Sourcepub fn latency<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
pub fn latency<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
Minimum latency from request sent to response headers received (ms).
Sourcepub fn download_throughput<VALUE: Into<JsFloat>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn download_throughput<VALUE: Into<JsFloat>>( &mut self, value: VALUE, ) -> &mut Self
Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
Sourcepub fn upload_throughput<VALUE: Into<JsFloat>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn upload_throughput<VALUE: Into<JsFloat>>( &mut self, value: VALUE, ) -> &mut Self
Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
Sourcepub fn connection_type<VALUE: Into<ConnectionType>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn connection_type<VALUE: Into<ConnectionType>>( &mut self, value: VALUE, ) -> &mut Self
Connection type if known.
Sourcepub fn build(
&self,
) -> Result<OverrideNetworkState, OverrideNetworkStateBuilderError>
pub fn build( &self, ) -> Result<OverrideNetworkState, OverrideNetworkStateBuilderError>
Trait Implementations§
Source§impl Clone for OverrideNetworkStateBuilder
impl Clone for OverrideNetworkStateBuilder
Source§fn clone(&self) -> OverrideNetworkStateBuilder
fn clone(&self) -> OverrideNetworkStateBuilder
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 moreAuto Trait Implementations§
impl Freeze for OverrideNetworkStateBuilder
impl RefUnwindSafe for OverrideNetworkStateBuilder
impl Send for OverrideNetworkStateBuilder
impl Sync for OverrideNetworkStateBuilder
impl Unpin for OverrideNetworkStateBuilder
impl UnsafeUnpin for OverrideNetworkStateBuilder
impl UnwindSafe for OverrideNetworkStateBuilder
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