pub struct MemoryCallbackHandler { /* private fields */ }
Expand description
A callback handler that collects run information in memory
Implementations§
Source§impl MemoryCallbackHandler
impl MemoryCallbackHandler
Sourcepub async fn get_runs_by_name(&self, name: &str) -> Vec<RunInfo>
pub async fn get_runs_by_name(&self, name: &str) -> Vec<RunInfo>
Get runs by name
Sourcepub async fn get_runs_by_type(&self, component_type: &str) -> Vec<RunInfo>
pub async fn get_runs_by_type(&self, component_type: &str) -> Vec<RunInfo>
Get runs by component type
Sourcepub async fn get_successful_runs(&self) -> Vec<RunInfo>
pub async fn get_successful_runs(&self) -> Vec<RunInfo>
Get successful runs
Sourcepub async fn get_failed_runs(&self) -> Vec<RunInfo>
pub async fn get_failed_runs(&self) -> Vec<RunInfo>
Get failed runs
Trait Implementations§
Source§impl CallbackHandler for MemoryCallbackHandler
impl CallbackHandler for MemoryCallbackHandler
Source§fn on_run_start<'life0, 'life1, 'async_trait>(
&'life0 self,
run_info: &'life1 RunInfo,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_run_start<'life0, 'life1, 'async_trait>(
&'life0 self,
run_info: &'life1 RunInfo,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when a run starts
Source§fn on_run_success<'life0, 'life1, 'async_trait>(
&'life0 self,
run_info: &'life1 RunInfo,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_run_success<'life0, 'life1, 'async_trait>(
&'life0 self,
run_info: &'life1 RunInfo,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when a run completes successfully
Source§fn on_run_error<'life0, 'life1, 'async_trait>(
&'life0 self,
run_info: &'life1 RunInfo,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_run_error<'life0, 'life1, 'async_trait>(
&'life0 self,
run_info: &'life1 RunInfo,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when a run fails
Source§fn on_run_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_info: &'life1 RunInfo,
chunk: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_run_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_info: &'life1 RunInfo,
chunk: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a run produces streaming output
Auto Trait Implementations§
impl Freeze for MemoryCallbackHandler
impl !RefUnwindSafe for MemoryCallbackHandler
impl Send for MemoryCallbackHandler
impl Sync for MemoryCallbackHandler
impl Unpin for MemoryCallbackHandler
impl !UnwindSafe for MemoryCallbackHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more