[][src]Struct laminar::LinkConditioner

pub struct LinkConditioner { /* fields omitted */ }

Network simulator. Used to simulate network conditions as dropped packets and packet delays. For use in Socket::set_link_conditioner.

Methods

impl LinkConditioner[src]

pub fn new() -> LinkConditioner[src]

Creates and returns a LinkConditioner

pub fn set_packet_loss(&mut self, rate: f64)[src]

Sets the packet loss rate of Link Conditioner

pub fn set_latency(&mut self, latency: Duration)[src]

Sets the latency the link conditioner should apply to each packet

pub fn should_send(&mut self) -> bool[src]

Function that checks to see if a packet should be dropped or not

Trait Implementations

impl Default for LinkConditioner[src]

impl Clone for LinkConditioner[src]

impl Debug for LinkConditioner[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,