pub struct Markdown {
pub markup: String,
pub code_theme: String,
pub inline_code_lexer: Option<String>,
pub inline_code_theme: Option<String>,
pub hyperlinks: bool,
pub justify: Option<JustifyMethod>,
}Expand description
Renders Markdown-formatted text to styled terminal output.
Supports headings, paragraphs, lists, code blocks, emphasis, links, block quotes, horizontal rules, and tables.
Fields§
§markup: StringRaw markdown source text.
code_theme: StringTheme for syntax-highlighted code blocks (reserved for future use).
inline_code_lexer: Option<String>Lexer for inline code (reserved for future use).
inline_code_theme: Option<String>Theme for inline code (reserved for future use).
hyperlinks: boolWhether to display hyperlink URLs after link text.
justify: Option<JustifyMethod>Text justification method.
Implementations§
Source§impl Markdown
impl Markdown
Sourcepub fn with_code_theme(self, theme: &str) -> Self
pub fn with_code_theme(self, theme: &str) -> Self
Set the code theme (builder pattern).
Sourcepub fn with_hyperlinks(self, hyperlinks: bool) -> Self
pub fn with_hyperlinks(self, hyperlinks: bool) -> Self
Set whether hyperlink URLs are shown (builder pattern).
Sourcepub fn with_justify(self, justify: JustifyMethod) -> Self
pub fn with_justify(self, justify: JustifyMethod) -> Self
Set the text justification (builder pattern).
Trait Implementations§
Source§impl Renderable for Markdown
impl Renderable for Markdown
Source§fn gilt_console(
&self,
console: &Console,
options: &ConsoleOptions,
) -> Vec<Segment>
fn gilt_console( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Produce segments for rendering on the given console with given options.
Auto Trait Implementations§
impl Freeze for Markdown
impl RefUnwindSafe for Markdown
impl Send for Markdown
impl Sync for Markdown
impl Unpin for Markdown
impl UnsafeUnpin for Markdown
impl UnwindSafe for Markdown
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> RenderableExt for Twhere
T: Renderable + 'static,
impl<T> RenderableExt for Twhere
T: Renderable + 'static,
Source§fn into_boxed_renderable(self) -> RenderableBox
fn into_boxed_renderable(self) -> RenderableBox
Convert this renderable into a
RenderableBox for type-erased storage. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more