Get a mutable reference to an observer's state.
(&mut self, observer: u64)
| 218 | |
| 219 | /// Get a mutable reference to an observer's state. |
| 220 | pub fn observer_state_mut(&mut self, observer: u64) -> Option<&mut ObserverState> { |
| 221 | self.observer_states |
| 222 | .iter_mut() |
| 223 | .find(|(id, _)| *id == observer) |
| 224 | .map(|(_, state)| state) |
| 225 | } |
| 226 | |
| 227 | /// Whether an observer's send queue is below the backpressure threshold. |
| 228 | /// Returns `false` if the observer is unknown. |
no test coverage detected