Skip to main content

KnowledgeBaseService

Trait KnowledgeBaseService 

Source
pub trait KnowledgeBaseService: Send + Sync {
Show 13 methods // Required methods fn create_note<'life0, 'async_trait>( &'life0 self, title: impl 'async_trait + Into<String> + Send, content: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_note_with_id<'life0, 'async_trait>( &'life0 self, id: LuhmannId, title: impl 'async_trait + Into<String> + Send, content: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_branch<'life0, 'life1, 'async_trait>( &'life0 self, parent_id: &'life1 LuhmannId, title: impl 'async_trait + Into<String> + Send, content: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_note<'life0, 'life1, 'async_trait>( &'life0 self, note_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_notes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_notes_by_prefix<'life0, 'life1, 'async_trait>( &'life0 self, prefix: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_note<'life0, 'life1, 'async_trait>( &'life0 self, note_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn search_notes<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn link_notes<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, from_id: &'life1 LuhmannId, to_id: &'life2 LuhmannId, context: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn get_links<'life0, 'life1, 'async_trait>( &'life0 self, note_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Vec<NoteLink>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn mark_continuation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, from_id: &'life1 LuhmannId, to_id: &'life2 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn create_index<'life0, 'life1, 'async_trait>( &'life0 self, parent_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_context<'life0, 'life1, 'async_trait>( &'life0 self, note_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<NoteContext>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait;
}
Expand description

Simplified Knowledge Base Service - shared across all agents, uses only Luhmann IDs

Required Methods§

Source

fn create_note<'life0, 'async_trait>( &'life0 self, title: impl 'async_trait + Into<String> + Send, content: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn create_note_with_id<'life0, 'async_trait>( &'life0 self, id: LuhmannId, title: impl 'async_trait + Into<String> + Send, content: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn create_branch<'life0, 'life1, 'async_trait>( &'life0 self, parent_id: &'life1 LuhmannId, title: impl 'async_trait + Into<String> + Send, content: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_note<'life0, 'life1, 'async_trait>( &'life0 self, note_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

fn list_notes_by_prefix<'life0, 'life1, 'async_trait>( &'life0 self, prefix: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn delete_note<'life0, 'life1, 'async_trait>( &'life0 self, note_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn search_notes<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn mark_continuation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, from_id: &'life1 LuhmannId, to_id: &'life2 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn create_index<'life0, 'life1, 'async_trait>( &'life0 self, parent_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_context<'life0, 'life1, 'async_trait>( &'life0 self, note_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<NoteContext>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§