pub fn update_probe(
            &mut self,
            sequence: Sequence,
            probe: Probe,
            received_time: SystemTime,
            found: bool,
        ) {
            match (self.target_ttl, self.target_seq) {
                (None, _) if found => {
                    self.target_ttl = Some(probe.ttl);
                    self.target_seq = Some(sequence);
                }
                (Some(_), Some(target_seq)) if found && sequence < target_seq => {
                    self.target_ttl = Some(probe.ttl);
                    self.target_seq = Some(sequence);
                }
                _ => {}
            }
            self.buffer[usize::from(sequence - self.round_sequence)] = probe;
            self.max_received_ttl = match self.max_received_ttl {
                Some(max_received_ttl) => Some(max_received_ttl.max(probe.ttl)),
                None => Some(probe.ttl),
            };
            self.received_time = Some(received_time);
            self.target_found |= found;
        }
/// Update the state of an `Probe`.
///
/// We want to update:
///
/// - the target ttl to be the time-to-live of the `Probe` request from the target
/// - the maximum ttl we have observed this round
/// - the latest packet received time
///
/// The ICMP replies may arrive out-of-order and so we must be careful here to avoid overwriting the state with
/// stale values.  We may also receive multiple replies from the target host with differing time-to-live values and
/// so must ensure we use the time-to-live with the lowest sequence number.
Update the state of an `Probe`.
We want to update.

the target ttl to be the time-to-live of the `Probe` request from the target
the maximum ttl we have observed this round
the latest packet received time

The ICMP replies may arrive out-of-order and so we must be careful here to avoid overwriting the state with
stale values.  We may also receive multiple replies from the target host with differing time-to-live values and
so must ensure we use the time-to-live with the lowest sequence number.
Update the state of an ` Probe ` . We want to update . the target ttl to be the time - to - live of the ` Probe ` request from the target the maximum ttl we have observed this round the latest packet received time The ICMP replies may arrive out - of - order and so we must be careful here to avoid overwriting the state with stale values . We may also receive multiple replies from the target host with differing time - to - live values and so must ensure we use the time - to - live with the lowest sequence number .
pub fn update_probe(
            &mut self,
            sequence: Sequence,
            probe: Probe,
            received_time: SystemTime,
            found: bool,
        ) {
            match (self.target_ttl, self.target_seq) {
                (None, _) if found => {
                    self.target_ttl = Some(probe.ttl);
                    self.target_seq = Some(sequence);
                }
                (Some(_), Some(target_seq)) if found && sequence < target_seq => {
                    self.target_ttl = Some(probe.ttl);
                    self.target_seq = Some(sequence);
                }
                _ => {}
            }
            self.buffer[usize::from(sequence - self.round_sequence)] = probe;
            self.max_received_ttl = match self.max_received_ttl {
                Some(max_received_ttl) => Some(max_received_ttl.max(probe.ttl)),
                None => Some(probe.ttl),
            };
            self.received_time = Some(received_time);
            self.target_found |= found;
        }
pub fn update_probe ( & mut self , sequence : Sequence , probe : Probe , received_time : SystemTime , found : bool , ) { match ( self . target_ttl , self . target_seq ) { ( None , _ ) if found => { self . target_ttl = Some ( probe . ttl ) ; self . target_seq = Some ( sequence ) ; } ( Some ( _ ) , Some ( target_seq ) ) if found && sequence < target_seq => { self . target_ttl = Some ( probe . ttl ) ; self . target_seq = Some ( sequence ) ; } _ => { } } self . buffer [ usize :: from ( sequence - self . round_sequence ) ] = probe ; self . max_received_ttl = match self . max_received_ttl { Some ( max_received_ttl ) => Some ( max_received_ttl . max ( probe . ttl ) ) , None => Some ( probe . ttl ) , } ; self . received_time = Some ( received_time ) ; self . target_found |= found ; }
Update the state of an `Probe`.
Update the state of an ` Probe ` .
&mut self
sequence
Sequence
probe
Probe
received_time
SystemTime
found
bool