pub fn add_attempt(
        &mut self,
        time: Time,
        started: Option<AtomicDateTime>,
        ended: Option<AtomicDateTime>,
        pause_time: Option<TimeSpan>,
    ) {
        let index = self
            .attempt_history
            .iter()
            .map(Attempt::index)
            .max()
            .unwrap_or(0);
        let index = max(0, index + 1);
        self.add_attempt_with_index(time, index, started, ended, pause_time);
    }
/// Adds a new Attempt to the Run's Attempt History. This is automatically
/// done if the Run is used with a Timer.
Adds a new Attempt to the Run's Attempt History. This is automatically
done if the Run is used with a Timer.
Adds a new Attempt to the Run ' s Attempt History . This is automatically done if the Run is used with a Timer .
pub fn add_attempt(
        &mut self,
        time: Time,
        started: Option<AtomicDateTime>,
        ended: Option<AtomicDateTime>,
        pause_time: Option<TimeSpan>,
    ) {
        let index = self
            .attempt_history
            .iter()
            .map(Attempt::index)
            .max()
            .unwrap_or(0);
        let index = max(0, index + 1);
        self.add_attempt_with_index(time, index, started, ended, pause_time);
    }
pub fn add_attempt ( & mut self , time : Time , started : Option < AtomicDateTime > , ended : Option < AtomicDateTime > , pause_time : Option < TimeSpan > , ) { let index = self . attempt_history . iter ( ) . map ( Attempt :: index ) . max ( ) . unwrap_or ( 0 ) ; let index = max ( 0 , index + 1 ) ; self . add_attempt_with_index ( time , index , started , ended , pause_time ) ; }
Adds a new Attempt to the Run's Attempt History.
Adds a new Attempt to the Run ' s Attempt History .
&mut self
time
Time
started
Option<AtomicDateTime>
ended
Option<AtomicDateTime>
pause_time
Option<TimeSpan>
&mut self
time
Time
started
Option<AtomicDateTime>
ended
Option<AtomicDateTime>
pause_time
Option<TimeSpan>