ThoughtProcessor

Trait ThoughtProcessor 

Source
pub trait ThoughtProcessor: Send + Sync {
    // Required methods
    fn process_thought<'life0, 'async_trait>(
        &'life0 self,
        thought: ThoughtData,
    ) -> Pin<Box<dyn Future<Output = Result<ThoughtData, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validate_thought<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thought: &'life1 ThoughtData,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_stats<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<ThinkingStats, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for processing thoughts

Required Methods§

Source

fn process_thought<'life0, 'async_trait>( &'life0 self, thought: ThoughtData, ) -> Pin<Box<dyn Future<Output = Result<ThoughtData, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Process a single thought

Source

fn validate_thought<'life0, 'life1, 'async_trait>( &'life0 self, thought: &'life1 ThoughtData, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate a thought before processing

Source

fn get_stats<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ThinkingStats, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get processing statistics

Implementors§