pub trait ReflexionHandler: Send + Sync {
// Required methods
fn reflect_on_failure<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
failed_action: &'life1 str,
error: &'life2 str,
context: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<ReflectionResult, AgentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn generate_alternatives<'life0, 'life1, 'async_trait>(
&'life0 self,
reflection: &'life1 ReflectionResult,
) -> Pin<Box<dyn Future<Output = Result<Vec<AlternativeAction>, AgentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn should_retry<'life0, 'life1, 'async_trait>(
&'life0 self,
reflection: &'life1 ReflectionResult,
retry_count: usize,
) -> Pin<Box<dyn Future<Output = Result<bool, AgentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Required Methods§
fn reflect_on_failure<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
failed_action: &'life1 str,
error: &'life2 str,
context: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<ReflectionResult, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn generate_alternatives<'life0, 'life1, 'async_trait>(
&'life0 self,
reflection: &'life1 ReflectionResult,
) -> Pin<Box<dyn Future<Output = Result<Vec<AlternativeAction>, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn should_retry<'life0, 'life1, 'async_trait>(
&'life0 self,
reflection: &'life1 ReflectionResult,
retry_count: usize,
) -> Pin<Box<dyn Future<Output = Result<bool, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".