Debug a keystream at any point in the handling by adding a DebugStream with a callback that knows how to write something. Omits Timeout Events, does not print empty keystreams
| 79 | /// |
| 80 | /// Omits Timeout Events, does not print empty keystreams |
| 81 | pub struct DebugStream<F> { |
| 82 | pub write_callback: F, |
| 83 | } |
| 84 | impl<T: USBKeyOut, F: FnMut(String)> ProcessKeys<T> for DebugStream<F> { |
| 85 | fn process_keys(&mut self, events: &mut Vec<(Event, EventStatus)>, _output: &mut T) ->HandlerResult { |
| 86 | if !events.is_empty() { |
nothing calls this directly
no outgoing calls
no test coverage detected