pub struct MarkdownLoader {
pub path: PathBuf,
pub split_by_heading: bool,
pub heading_level: usize,
}Expand description
Markdown document loader
Supports loading Markdown files, optionally splitting them into multiple documents by heading.
Fields§
§path: PathBufMarkdown file path
split_by_heading: boolWhether to split by heading
If true, splits into multiple documents by # heading
heading_level: usizeThe heading level to split on (1-6)
For example, heading_level=2 splits on ##
Implementations§
Source§impl MarkdownLoader
impl MarkdownLoader
Sourcepub fn new_with_heading_split(
path: impl Into<PathBuf>,
heading_level: usize,
) -> Self
pub fn new_with_heading_split( path: impl Into<PathBuf>, heading_level: usize, ) -> Self
Creates a heading-splitting Markdown loader
§Arguments
path- the Markdown file pathheading_level- the heading level to split on (1-6)
Sourcepub fn with_split_by_heading(self, split: bool) -> Self
pub fn with_split_by_heading(self, split: bool) -> Self
Sets whether to split by heading
Sourcepub fn with_heading_level(self, level: usize) -> Self
pub fn with_heading_level(self, level: usize) -> Self
Sets the heading level
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MarkdownLoader
impl RefUnwindSafe for MarkdownLoader
impl Send for MarkdownLoader
impl Sync for MarkdownLoader
impl Unpin for MarkdownLoader
impl UnsafeUnpin for MarkdownLoader
impl UnwindSafe for MarkdownLoader
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