Skip to main content

KnowledgeBaseService

Trait KnowledgeBaseService 

Source
pub trait KnowledgeBaseService: Send + Sync {
Show 25 methods // Required methods fn create_knowledge_base<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, name: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<KnowledgeBase>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_knowledge_base<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<KnowledgeBase>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_note<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, 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 get_note<'life0, 'async_trait>( &'life0 self, note_id: NoteId, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_note<'life0, 'life1, 'async_trait>( &'life0 self, note: &'life1 Note, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_note<'life0, 'async_trait>( &'life0 self, note_id: NoteId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_agent_notes<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn search_notes<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, 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 add_tag<'life0, 'async_trait>( &'life0 self, note_id: NoteId, tag: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn remove_tag<'life0, 'life1, 'async_trait>( &'life0 self, note_id: NoteId, tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_notes_by_tag<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_all_tags<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn link_notes<'life0, 'async_trait>( &'life0 self, from_note_id: NoteId, to_note_id: NoteId, link_type: LinkType, context: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn unlink_notes<'life0, 'async_trait>( &'life0 self, from_note_id: NoteId, to_note_id: NoteId, link_type: LinkType, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_links_from<'life0, 'async_trait>( &'life0 self, note_id: NoteId, link_type: Option<LinkType>, ) -> Pin<Box<dyn Future<Output = Result<Vec<NoteLink>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_links_to<'life0, 'async_trait>( &'life0 self, note_id: NoteId, link_type: Option<LinkType>, ) -> Pin<Box<dyn Future<Output = Result<Vec<NoteLink>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_backlinks<'life0, 'async_trait>( &'life0 self, note_id: NoteId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_related_notes<'life0, 'async_trait>( &'life0 self, note_id: NoteId, depth: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn find_path<'life0, 'async_trait>( &'life0 self, start_note_id: NoteId, end_note_id: NoteId, max_depth: usize, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<NoteId>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_note_graph<'life0, 'async_trait>( &'life0 self, note_id: NoteId, depth: usize, ) -> Pin<Box<dyn Future<Output = Result<NoteGraph>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_note_with_luhmann_id<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, luhmann_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_note_branch<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, parent_note_id: NoteId, 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 get_note_by_luhmann_id<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, luhmann_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Option<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_next_available_id<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, parent_id: Option<&'life1 LuhmannId>, ) -> Pin<Box<dyn Future<Output = Result<LuhmannId>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_notes_by_luhmann_prefix<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, prefix: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait;
}

Required Methods§

Source

fn create_knowledge_base<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, name: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<KnowledgeBase>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_knowledge_base<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<KnowledgeBase>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn create_note<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, 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 get_note<'life0, 'async_trait>( &'life0 self, note_id: NoteId, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

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

Source

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

Source

fn search_notes<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, 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 add_tag<'life0, 'async_trait>( &'life0 self, note_id: NoteId, tag: 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 remove_tag<'life0, 'life1, 'async_trait>( &'life0 self, note_id: NoteId, tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Note>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_notes_by_tag<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, tag: &'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 get_all_tags<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn find_path<'life0, 'async_trait>( &'life0 self, start_note_id: NoteId, end_note_id: NoteId, max_depth: usize, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<NoteId>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_note_graph<'life0, 'async_trait>( &'life0 self, note_id: NoteId, depth: usize, ) -> Pin<Box<dyn Future<Output = Result<NoteGraph>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn create_note_with_luhmann_id<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, luhmann_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_note_branch<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, parent_note_id: NoteId, 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 get_note_by_luhmann_id<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, luhmann_id: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Option<Note>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

fn list_notes_by_luhmann_prefix<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: AgentId, prefix: &'life1 LuhmannId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Note>>> + 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§