pub struct RoundTripStatistics {
pub min: f64,
pub max: f64,
pub average: f64,
pub standard_deviation: f64,
}
Fields§
§min: f64
§max: f64
§average: f64
§standard_deviation: f64
Trait Implementations§
Source§impl Clone for RoundTripStatistics
impl Clone for RoundTripStatistics
Source§fn clone(&self) -> RoundTripStatistics
fn clone(&self) -> RoundTripStatistics
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 RoundTripStatistics
impl Debug for RoundTripStatistics
Source§impl Display for RoundTripStatistics
impl Display for RoundTripStatistics
Source§impl FromStr for RoundTripStatistics
impl FromStr for RoundTripStatistics
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse the ping standard output string round trip metrics into milliseconds as f64 floats.
Example:
use std::str::FromStr;
use ping_command::round_trip_statistics::RoundTripStatistics;
let str = "round-trip min/avg/max/stddev = 12.445/26.791/61.365/20.049 ms";
let round_trip_statistics = RoundTripStatistics::from_str(&str),unwrap();
assert_eq!(round_trip_statistics.min, 12.445);
assert_eq!(round_trip_statistics.max, 61.365);
assert_eq!(round_trip_statistics.average, 26.791);
assert_eq!(round_trip_statistics.standard_deviation, 20.049);
Source§type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
impl Copy for RoundTripStatistics
Auto Trait Implementations§
impl Freeze for RoundTripStatistics
impl RefUnwindSafe for RoundTripStatistics
impl Send for RoundTripStatistics
impl Sync for RoundTripStatistics
impl Unpin for RoundTripStatistics
impl UnwindSafe for RoundTripStatistics
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