pub fn tap_diagnostics<F>(source: Stream, f: F) -> Streamwhere F: Fn(&StreamDiagnostic) -> Result<()> + Send + Sync + 'static,
Returns a stream that runs f on each diagnostic packet, leaving it intact.
f
Non-diagnostic packets pass through without invoking f.