pub struct EmulateNetworkConditionsBuilder { /* private fields */ }Expand description
Builder for EmulateNetworkConditions.
Implementations§
Source§impl EmulateNetworkConditionsBuilder
impl EmulateNetworkConditionsBuilder
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 packet_loss<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
pub fn packet_loss<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
Sourcepub fn packet_queue_length<VALUE: Into<JsUInt>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn packet_queue_length<VALUE: Into<JsUInt>>( &mut self, value: VALUE, ) -> &mut Self
WebRTC packet queue length (packet). 0 removes any queue length limitations.
Sourcepub fn packet_reordering<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn packet_reordering<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
WebRTC packetReordering feature.
Sourcepub fn build(
&self,
) -> Result<EmulateNetworkConditions, EmulateNetworkConditionsBuilderError>
pub fn build( &self, ) -> Result<EmulateNetworkConditions, EmulateNetworkConditionsBuilderError>
Trait Implementations§
Source§impl Clone for EmulateNetworkConditionsBuilder
impl Clone for EmulateNetworkConditionsBuilder
Source§fn clone(&self) -> EmulateNetworkConditionsBuilder
fn clone(&self) -> EmulateNetworkConditionsBuilder
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 EmulateNetworkConditionsBuilder
impl RefUnwindSafe for EmulateNetworkConditionsBuilder
impl Send for EmulateNetworkConditionsBuilder
impl Sync for EmulateNetworkConditionsBuilder
impl Unpin for EmulateNetworkConditionsBuilder
impl UnsafeUnpin for EmulateNetworkConditionsBuilder
impl UnwindSafe for EmulateNetworkConditionsBuilder
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