pub struct MarkdownWriter<W: AsyncWriteExt + Unpin> { /* private fields */ }Expand description
A writer that generates Markdown output with syntax-highlighted code blocks.
Uses dynamic backtick fencing to safely embed code that may contain triple backticks (like other Markdown files).
Implementations§
Source§impl MarkdownWriter<File>
impl MarkdownWriter<File>
Sourcepub fn new(writer: BufWriter<File>) -> Self
pub fn new(writer: BufWriter<File>) -> Self
Creates a new MarkdownWriter wrapping the given buffered writer.
Sourcepub async fn write_entry(
&mut self,
entry: &DirEntry,
project_root: &Path,
) -> Result<()>
pub async fn write_entry( &mut self, entry: &DirEntry, project_root: &Path, ) -> Result<()>
Writes a single file entry to the Markdown output.
- Text files are wrapped in code blocks with appropriate language tags
- Binary files are marked with “(binary file omitted)”
- Dynamic fencing ensures safe embedding of files containing backticks
Auto Trait Implementations§
impl<W> Freeze for MarkdownWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for MarkdownWriter<W>where
W: RefUnwindSafe,
impl<W> Send for MarkdownWriter<W>where
W: Send,
impl<W> Sync for MarkdownWriter<W>where
W: Sync,
impl<W> Unpin for MarkdownWriter<W>
impl<W> UnwindSafe for MarkdownWriter<W>where
W: UnwindSafe,
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