You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hystart_plus_plus.rs
    path of file: ./repos/tquic/src/congestion_control
    
    the code of the file until where you have to start completion: // Copyright (c) 2023 The TQUIC Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! HyStart++: Modified Slow Start for TCP.
//!
//! HyStart++, a simple modification to the slow start phase of congestion
//! control algorithms. Slow start can overshoot the ideal send rate in many cases,
//! causing high packet loss and poor performance. HyStart++ uses increase in
//! round-trip delay as a heuristic to find an exit point before possible overshoot.
//! It also adds a mitigation to prevent jitter from causing premature slow start exit.
//!
//! See <https://www.rfc-editor.org/rfc/rfc9406.html>.

use std::time::Duration;
use std::time::Instant;

/// Tuning constants. Lower bound of the delay increase sensitivity.
///
/// Smaller values of `MIN_RTT_THRESH` may cause spurious exits from slow start.
///
/// See <https://www.rfc-editor.org/rfc/rfc9406.html#name-tuning-constants-and-other->.
const MIN_RTT_THRESH: Duration = Durati
    
    pub fn on_ack(&mut self, pkt_num: u64, acked_bytes: u64, rtt: Duration) {
        if !self.enabled && !self.has_exited() {
            return;
        }

        self.max_acked_packet_num = pkt_num.max(self.max_acked_packet_num);

        // Keep track of the minimum observed RTT.
        self.current_round_min_rtt = self.current_round_min_rtt.min(rtt);

        self.rtt_sample_count += 1;

        // Check to see if delay increase triggers slow start exit.
        // See <https://www.rfc-editor.org/rfc/rfc9406.html#name-algorithm-details>.
        match self.phase {
            HystartPhase::InStandardSlowStart => {
                if self.rtt_sample_count >= N_RTT_SAMPLE
                    && self.current_round_min_rtt != Duration::MAX
                    && self.last_round_min_rtt != Duration::MAX
                {
                    let rtt_thresh = (self.last_round_min_rtt / MIN_RTT_DIVISOR)
                        .clamp(MIN_RTT_THRESH, MAX_RTT_THRESH);

                    if self.current_round_min_rtt
                        >= self.last_round_min_rtt.saturating_add(rtt_thresh)
                    {
                        self.css_baseline_min_rtt = self.current_round_min_rtt;
                        self.phase = HystartPhase::InConservativeSlowStart;
                    }
                }
            }
            HystartPhase::InConservativeSlowStart => {
                if self.rtt_sample_count >= N_RTT_SAMPLE
                    && self.current_round_min_rtt < self.css_baseline_min_rtt
                {
                    // Slow start exit was spurious, resume standard slow start.
                    self.css_baseline_min_rtt = Duration::MAX;
                    self.phase = HystartPhase::InStandardSlowStart;
                    self.css_round_count = 0;
                }
            }
            _ => (),
        };
    }