MCPcopy Create free account
hub / github.com/TyberiusPrime/KeyToKey / DebugStream

Class DebugStream

src/handlers/debug_handlers.rs:81–83  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

79///
80/// Omits Timeout Events, does not print empty keystreams
81pub struct DebugStream<F> {
82 pub write_callback: F,
83}
84impl<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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected