Increment the counter by 1, respecting the limit and enabled status. Returns true if incremented, false otherwise.
(&mut self)
| 59 | |
| 60 | // --- Methods taking &self (Immutable Access) --- |
| 61 | |
| 62 | // Get the current count |
| 63 | fn get_count(&self) -> u32 { |
| 64 | self.count |
| 65 | } |
| 66 | |
| 67 | // Get the name |
| 68 | fn get_name(&self) -> &'static str { |
| 69 | self.name |
| 70 | } |
| 71 | |
| 72 | // Get the limit |
| 73 | fn get_limit(&self) -> u32 { |
| 74 | self.limit |
| 75 | } |
| 76 | |
| 77 | // Check if the counter is enabled |
nothing calls this directly
no test coverage detected