pub trait CallbackHandler: Send + Sync {
// Provided methods
fn on_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
input: &'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_success<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
output: &'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_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
error: &'life2 FerricLinkError,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn on_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
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 { ... }
}
Expand description
Trait for callback handlers that can be used during runnable execution
Provided Methods§
Sourcefn on_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
input: &'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_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
input: &'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 runnable starts
Sourcefn on_success<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
output: &'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_success<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
output: &'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 runnable completes successfully
Sourcefn on_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
error: &'life2 FerricLinkError,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
error: &'life2 FerricLinkError,
) -> 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 runnable fails
Sourcefn on_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
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_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
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 runnable produces streaming output