pub struct MarkdownEngine { /* private fields */ }Expand description
The core indexing engine that transforms Markdown text into a Virtual File System. It uses a BTreeMap to maintain an ordered, searchable index of all sections.
Implementations§
Source§impl MarkdownEngine
impl MarkdownEngine
Sourcepub fn new(content: &str) -> MarkdownEngine
pub fn new(content: &str) -> MarkdownEngine
Parses the provided Markdown content and builds a hierarchical Virtual File System index.
Sourcepub fn ls(&self, path: &str, page: usize, size: usize) -> PaginatedResult
pub fn ls(&self, path: &str, page: usize, size: usize) -> PaginatedResult
Lists direct sub-sections for a given hierarchical path with pagination support. Use an empty path (“”) to retrieve root-level headings.
Sourcepub fn get_title(&self, path: &str) -> Option<String>
pub fn get_title(&self, path: &str) -> Option<String>
Retrieves the human-readable title of the section at the specified path.
Sourcepub fn read(&self, path: &str) -> Option<String>
pub fn read(&self, path: &str) -> Option<String>
Reads the direct text content of a section (non-recursive).
Sourcepub fn read_full(&self, path: &str) -> Option<String>
pub fn read_full(&self, path: &str) -> Option<String>
Reads the full content of a section, including all its sub-sections recursively.
Sourcepub fn get_reference(&self, ref_id: &str) -> Option<String>
pub fn get_reference(&self, ref_id: &str) -> Option<String>
Resolves a Markdown reference ID to its corresponding URL.
Auto Trait Implementations§
impl Freeze for MarkdownEngine
impl RefUnwindSafe for MarkdownEngine
impl Send for MarkdownEngine
impl Sync for MarkdownEngine
impl Unpin for MarkdownEngine
impl UnsafeUnpin for MarkdownEngine
impl UnwindSafe for MarkdownEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more