fn count_events(&self, event_type: &str) -> usize {
        self.handler
            .events
            .read()
            .unwrap()
            .iter()
            .filter(|cmap_event| cmap_event.name() == event_type)
            .count()
    }
// Counts the number of events of the given type that have occurred so far.
Counts the number of events of the given type that have occurred so far.
Counts the number of events of the given type that have occurred so far .
fn count_events(&self, event_type: &str) -> usize {
        self.handler
            .events
            .read()
            .unwrap()
            .iter()
            .filter(|cmap_event| cmap_event.name() == event_type)
            .count()
    }
fn count_events ( & self , event_type : & str ) -> usize { self . handler . events . read ( ) . unwrap ( ) . iter ( ) . filter ( | cmap_event | cmap_event . name ( ) == event_type ) . count ( ) }
Counts the number of events of the given type that have occurred so far.
Counts the number of events of the given type that have occurred so far .
&self
event_type
&str
&self
event_type
&str