fn next_step(&self) -> Option<DummyInstant> {
            // Get earliest timer in all contexts.
            let next_timer = self
                .contexts
                .iter()
                .filter_map(|(_, ctx)| match ctx.timers.timers.peek() {
                    Some(tmr) => Some(tmr.0),
                    None => None,
                })
                .min();
            // Get the instant for the next packet.
            let next_packet_due = self.pending_frames.peek().map(|t| t.0);

            // Return the earliest of them both, and protect against returning a
            // time in the past.
            match next_timer {
                Some(t) if next_packet_due.is_some() => Some(t).min(next_packet_due),
                Some(t) => Some(t),
                None => next_packet_due,
            }
            .map(|t| t.max(self.current_time))
        }
/// Calculates the next `DummyInstant` when events are available.
///
/// Returns the smallest `DummyInstant` greater than or equal to the
/// current time for which an event is available. If no events are
/// available, returns `None`.
Calculates the next `DummyInstant` when events are available.
Returns the smallest `DummyInstant` greater than or equal to the
current time for which an event is available. If no events are
available, returns `None`.
Calculates the next ` DummyInstant ` when events are available . Returns the smallest ` DummyInstant ` greater than or equal to the current time for which an event is available . If no events are available returns ` None ` .
fn next_step(&self) -> Option<DummyInstant> {
            // Get earliest timer in all contexts.
            let next_timer = self
                .contexts
                .iter()
                .filter_map(|(_, ctx)| match ctx.timers.timers.peek() {
                    Some(tmr) => Some(tmr.0),
                    None => None,
                })
                .min();
            // Get the instant for the next packet.
            let next_packet_due = self.pending_frames.peek().map(|t| t.0);
            // Return the earliest of them both, and protect against returning a
            // time in the past.
            match next_timer {
                Some(t) if next_packet_due.is_some() => Some(t).min(next_packet_due),
                Some(t) => Some(t),
                None => next_packet_due,
            }
            .map(|t| t.max(self.current_time))
        }
fn next_step ( & self ) -> Option < DummyInstant > { // Get earliest timer in all contexts. let next_timer = self . contexts . iter ( ) . filter_map ( | ( _ , ctx ) | match ctx . timers . timers . peek ( ) { Some ( tmr ) => Some ( tmr . 0 ) , None => None , } ) . min ( ) ; // Get the instant for the next packet. let next_packet_due = self . pending_frames . peek ( ) . map ( | t | t . 0 ) ; // Return the earliest of them both, and protect against returning a // time in the past. match next_timer { Some ( t ) if next_packet_due . is_some ( ) => Some ( t ) . min ( next_packet_due ) , Some ( t ) => Some ( t ) , None => next_packet_due , } . map ( | t | t . max ( self . current_time ) ) }
Calculates the next `DummyInstant` when events are available.
Calculates the next ` DummyInstant ` when events are available .
&self
&self