pub struct MarkdownStreamer { /* private fields */ }Implementations§
Source§impl MarkdownStreamer
impl MarkdownStreamer
pub fn new() -> Self
Sourcepub fn set_width(&mut self, width: usize)
pub fn set_width(&mut self, width: usize)
Set a fixed width for rendering. If not set, terminal size is queried.
Sourcepub fn set_margin(&mut self, margin: usize)
pub fn set_margin(&mut self, margin: usize)
Set the margin (default 2)
Sourcepub fn print_chunk<W: Write>(
&mut self,
writer: &mut W,
text: &str,
) -> Result<()>
pub fn print_chunk<W: Write>( &mut self, writer: &mut W, text: &str, ) -> Result<()>
Main entry point: Process a chunk of text and write to the provided writer.
Sourcepub fn flush<W: Write>(&mut self, writer: &mut W) -> Result<()>
pub fn flush<W: Write>(&mut self, writer: &mut W) -> Result<()>
Flush remaining buffer (useful at end of stream).
pub fn render_inline( &mut self, text: &str, def_bg: Option<Color>, restore_fg: Option<&str>, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MarkdownStreamer
impl RefUnwindSafe for MarkdownStreamer
impl Send for MarkdownStreamer
impl Sync for MarkdownStreamer
impl Unpin for MarkdownStreamer
impl UnwindSafe for MarkdownStreamer
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