pub trait StreamingCallbackHandler<T>: Send + Sync {
// Required methods
fn tap_output_aiter(
&self,
run_id: Uuid,
output: Pin<Box<dyn Stream<Item = T> + Send>>,
) -> Pin<Box<dyn Stream<Item = T> + Send>>;
fn tap_output_iter(
&self,
run_id: Uuid,
output: Box<dyn Iterator<Item = T> + Send>,
) -> Box<dyn Iterator<Item = T> + Send>;
}Expand description
A trait for streaming callback handlers.
This is a common mixin that the callback handlers for both astream events and astream log inherit from.
The tap_output_aiter method is invoked in some contexts to produce
callbacks for intermediate results.