[−][src]Struct laminar::LinkConditioner
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]
fn clone(&self) -> LinkConditioner
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LinkConditioner
[src]
Auto Trait Implementations
impl Send for LinkConditioner
impl Unpin for LinkConditioner
impl Sync for LinkConditioner
impl UnwindSafe for LinkConditioner
impl RefUnwindSafe for LinkConditioner
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,