pub struct IcmpEchoReply { /* private fields */ }
Expand description
Reply received from an ICMP echo request.
Contains the destination IP address, status of the ping operation, and the measured round-trip time.
Implementations§
Source§impl IcmpEchoReply
impl IcmpEchoReply
Sourcepub fn new(
destination: IpAddr,
status: IcmpEchoStatus,
round_trip_time: Duration,
) -> Self
pub fn new( destination: IpAddr, status: IcmpEchoStatus, round_trip_time: Duration, ) -> Self
Creates a new ICMP echo reply.
§Arguments
destination
- The IP address that was pingedstatus
- The status of the ping operationround_trip_time
- The measured round-trip time
Sourcepub fn destination(&self) -> IpAddr
pub fn destination(&self) -> IpAddr
Returns the destination IP address that was pinged.
Sourcepub fn status(&self) -> IcmpEchoStatus
pub fn status(&self) -> IcmpEchoStatus
Returns the status of the ping operation.
Sourcepub fn round_trip_time(&self) -> Duration
pub fn round_trip_time(&self) -> Duration
Returns the measured round-trip time.
For successful pings, this represents the time between sending the echo request and receiving the echo reply. For failed pings, this may be zero or represent the time until the failure was detected.
Trait Implementations§
Source§impl Clone for IcmpEchoReply
impl Clone for IcmpEchoReply
Source§fn clone(&self) -> IcmpEchoReply
fn clone(&self) -> IcmpEchoReply
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for IcmpEchoReply
impl Debug for IcmpEchoReply
Source§impl PartialEq for IcmpEchoReply
impl PartialEq for IcmpEchoReply
impl Copy for IcmpEchoReply
impl Eq for IcmpEchoReply
impl StructuralPartialEq for IcmpEchoReply
Auto Trait Implementations§
impl Freeze for IcmpEchoReply
impl RefUnwindSafe for IcmpEchoReply
impl Send for IcmpEchoReply
impl Sync for IcmpEchoReply
impl Unpin for IcmpEchoReply
impl UnwindSafe for IcmpEchoReply
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