Struct tokio_icmp_echo::PingChain
source · [−]pub struct PingChain { /* private fields */ }
Expand description
Ping the same host several times.
Implementations
sourceimpl 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ⓘNotable traits for PingFutureimpl Future for PingFuture type Output = Result<Option<Duration>, Error>;
pub fn send(&mut self) -> PingFutureⓘNotable traits for PingFutureimpl Future for PingFuture type Output = Result<Option<Duration>, Error>;
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 Send for PingChain
impl Sync for PingChain
impl Unpin for PingChain
impl !UnwindSafe for PingChain
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more