pub struct Stats { /* private fields */ }Expand description
Mutable accumulator used during a session.
Implementations§
Source§impl Stats
impl Stats
Sourcepub fn new(addr: SocketAddr, resolve_ms: f64) -> Self
pub fn new(addr: SocketAddr, resolve_ms: f64) -> Self
Create a new accumulator.
Sourcepub fn feed(&mut self, success: bool, rtt: f64, want_jitter: bool) -> PingResult
pub fn feed(&mut self, success: bool, rtt: f64, want_jitter: bool) -> PingResult
Feed one probe result and obtain a PingResult to hand to the formatter.
Sourcepub fn should_continue(&self, args: &Args) -> bool
pub fn should_continue(&self, args: &Args) -> bool
Should the main loop continue?
Sourcepub fn should_break(&self, success: bool, args: &Args) -> bool
pub fn should_break(&self, success: bool, args: &Args) -> bool
Should we break early because -e/–exit-on-success?
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
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