pub struct MarkdownRender { /* private fields */ }Expand description
Renders markdown text to styled terminal output via Renderable.
Implementations§
Source§impl MarkdownRender
impl MarkdownRender
Sourcepub fn width(self, w: usize) -> Self
pub fn width(self, w: usize) -> Self
Set a fixed rendering width (defaults to the console width).
Sourcepub fn code_theme(self, theme: impl Into<String>) -> Self
pub fn code_theme(self, theme: impl Into<String>) -> Self
Set the code syntax-highlighting theme (default: "default").
Sourcepub fn hyperlinks(self, enabled: bool) -> Self
pub fn hyperlinks(self, enabled: bool) -> Self
Enable or disable hyperlink rendering (default: true).
Trait Implementations§
Source§impl Clone for MarkdownRender
impl Clone for MarkdownRender
Source§fn clone(&self) -> MarkdownRender
fn clone(&self) -> MarkdownRender
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarkdownRender
impl Debug for MarkdownRender
Source§impl Renderable for MarkdownRender
impl Renderable for MarkdownRender
Source§fn render(&self, options: &ConsoleOptions) -> RenderResult
fn render(&self, options: &ConsoleOptions) -> RenderResult
Render this object into a
RenderResult using the provided options. Read moreSource§fn measure(&self, _options: &ConsoleOptions) -> Option<Measurement>
fn measure(&self, _options: &ConsoleOptions) -> Option<Measurement>
Optional width-measurement hook (equivalent to
__rich_measure__).
Override to provide min/max width constraints for layout.Auto Trait Implementations§
impl Freeze for MarkdownRender
impl RefUnwindSafe for MarkdownRender
impl Send for MarkdownRender
impl Sync for MarkdownRender
impl Unpin for MarkdownRender
impl UnsafeUnpin for MarkdownRender
impl UnwindSafe for MarkdownRender
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