pub trait MarkdownSource: Send + Sync {
// Required methods
fn index_all(&self) -> Result<usize>;
fn note_tree(&self, dir: &str) -> Result<Vec<NoteEntry>>;
fn note_read(&self, path: &str) -> Result<Option<String>>;
fn extract_headings(&self, content: &str) -> Vec<String>;
}Expand description
Abstract markdown knowledge source.
Implemented by oxios_markdown::KnowledgeBase in the kernel.
Allows auto_bridge to read .md files without depending on
oxios-markdown directly.
Required Methods§
Sourcefn note_read(&self, path: &str) -> Result<Option<String>>
fn note_read(&self, path: &str) -> Result<Option<String>>
Read a note’s content. Returns None if not found.
Sourcefn extract_headings(&self, content: &str) -> Vec<String>
fn extract_headings(&self, content: &str) -> Vec<String>
Extract markdown headings from content.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".