pub struct PingChain { /* private fields */ }Expand description
Ping the same host several times.
Implementations§
Source§impl PingChain
impl PingChain
Sourcepub fn seq_cnt(self, seq_cnt: u16) -> Self
pub fn seq_cnt(self, seq_cnt: u16) -> Self
Set ICMP seq_cnt, this value will be incremented by one for every send.
Default value is 0.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Set ping timeout. Default timeout is two seconds.
Sourcepub fn send(&mut self) -> PingFuture
pub fn send(&mut self) -> PingFuture
Send ICMP request and wait for response.
Sourcepub fn stream(self) -> PingChainStream
pub fn stream(self) -> PingChainStream
Create infinite stream of ping response times.
Auto Trait Implementations§
impl !RefUnwindSafe for PingChain
impl !UnwindSafe for PingChain
impl Freeze for PingChain
impl Send for PingChain
impl Sync for PingChain
impl Unpin for PingChain
impl UnsafeUnpin for PingChain
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