Struct laminar::LinkConditioner [−][src]
pub struct LinkConditioner { /* fields omitted */ }
Network simulator. Used to simulate network conditions as dropped packets and packet delays. For use in FakeSocket::set_link_conditioner.
Implementations
impl LinkConditioner
[src]
impl LinkConditioner
[src]pub fn new() -> LinkConditioner
[src]
pub fn new() -> LinkConditioner
[src]Creates and returns a LinkConditioner
pub fn set_packet_loss(&mut self, rate: f64)
[src]
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]
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]
pub fn should_send(&mut self) -> bool
[src]Function that checks to see if a packet should be dropped or not
Trait Implementations
impl Clone for LinkConditioner
[src]
impl Clone for LinkConditioner
[src]fn clone(&self) -> LinkConditioner
[src]
fn clone(&self) -> LinkConditioner
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for LinkConditioner
[src]
impl Debug for LinkConditioner
[src]Auto Trait Implementations
impl RefUnwindSafe for LinkConditioner
impl Send for LinkConditioner
impl Sync for LinkConditioner
impl Unpin for LinkConditioner
impl UnwindSafe for LinkConditioner
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,