pub fn leftover(&self) -> Option<Duration> {
        self.timeout.map(|timeout| {
            let elapsed = self.start.elapsed();

            if elapsed >= timeout {
                Duration::from_secs(0)
            } else {
                timeout - elapsed
            }
        })
    }
/// Returns the timeout leftover (initial timeout duration - elapsed duration).
Returns the timeout leftover (initial timeout duration - elapsed duration).
Returns the timeout leftover ( initial timeout duration - elapsed duration ) .
pub fn leftover(&self) -> Option<Duration> {
        self.timeout.map(|timeout| {
            let elapsed = self.start.elapsed();
            if elapsed >= timeout {
                Duration::from_secs(0)
            } else {
                timeout - elapsed
            }
        })
    }
pub fn leftover ( & self ) -> Option < Duration > { self . timeout . map ( | timeout | { let elapsed = self . start . elapsed ( ) ; if elapsed >= timeout { Duration :: from_secs ( 0 ) } else { timeout - elapsed } } ) }
Returns the timeout leftover (initial timeout duration - elapsed duration).
Returns the timeout leftover ( initial timeout duration - elapsed duration ) .
&self
&self