pub struct NetworkConditionsBuilder { /* private fields */ }Implementations§
Source§impl NetworkConditionsBuilder
impl NetworkConditionsBuilder
pub fn url_pattern( self, url_pattern: impl Into<String>, ) -> NetworkConditionsBuilder
pub fn latency(self, latency: impl Into<f64>) -> NetworkConditionsBuilder
pub fn download_throughput( self, download_throughput: impl Into<f64>, ) -> NetworkConditionsBuilder
pub fn upload_throughput( self, upload_throughput: impl Into<f64>, ) -> NetworkConditionsBuilder
pub fn connection_type( self, connection_type: impl Into<ConnectionType>, ) -> NetworkConditionsBuilder
pub fn packet_loss( self, packet_loss: impl Into<f64>, ) -> NetworkConditionsBuilder
pub fn packet_queue_length( self, packet_queue_length: impl Into<i64>, ) -> NetworkConditionsBuilder
pub fn packet_reordering( self, packet_reordering: impl Into<bool>, ) -> NetworkConditionsBuilder
pub fn build(self) -> Result<NetworkConditions, String>
Trait Implementations§
Source§impl Clone for NetworkConditionsBuilder
impl Clone for NetworkConditionsBuilder
Source§fn clone(&self) -> NetworkConditionsBuilder
fn clone(&self) -> NetworkConditionsBuilder
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 moreSource§impl Default for NetworkConditionsBuilder
impl Default for NetworkConditionsBuilder
Source§fn default() -> NetworkConditionsBuilder
fn default() -> NetworkConditionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NetworkConditionsBuilder
impl RefUnwindSafe for NetworkConditionsBuilder
impl Send for NetworkConditionsBuilder
impl Sync for NetworkConditionsBuilder
impl Unpin for NetworkConditionsBuilder
impl UnwindSafe for NetworkConditionsBuilder
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