pub struct MarkdownTheme {Show 16 fields
pub heading: fn(&str) -> String,
pub link: fn(&str) -> String,
pub link_url: fn(&str) -> String,
pub code: fn(&str) -> String,
pub code_block: fn(&str) -> String,
pub code_block_border: fn(&str) -> String,
pub quote: fn(&str) -> String,
pub quote_border: fn(&str) -> String,
pub hr: fn(&str) -> String,
pub list_bullet: fn(&str) -> String,
pub bold: fn(&str) -> String,
pub italic: fn(&str) -> String,
pub strikethrough: fn(&str) -> String,
pub underline: fn(&str) -> String,
pub highlight_code: Option<Arc<dyn Fn(&str, Option<&str>) -> Vec<String> + Sync + Send>>,
pub code_block_indent: String,
}Expand description
Theme functions for markdown elements (ANSI wrappers).
Fields§
§heading: fn(&str) -> StringHeading text.
link: fn(&str) -> StringLink text.
link_url: fn(&str) -> StringParenthetical URL when hyperlinks are off.
code: fn(&str) -> StringInline code.
code_block: fn(&str) -> StringCode block body line.
code_block_border: fn(&str) -> StringCode block fence border.
quote: fn(&str) -> StringBlockquote body.
quote_border: fn(&str) -> StringBlockquote border (│ ).
hr: fn(&str) -> StringHorizontal rule.
list_bullet: fn(&str) -> StringList bullet / marker.
bold: fn(&str) -> StringBold span.
italic: fn(&str) -> StringItalic span.
strikethrough: fn(&str) -> StringStrikethrough span.
underline: fn(&str) -> StringUnderline span.
highlight_code: Option<Arc<dyn Fn(&str, Option<&str>) -> Vec<String> + Sync + Send>>Optional syntax highlighter: (code, lang) -> lines.
code_block_indent: StringIndent prefix for code block body lines (default " ").
Trait Implementations§
Source§impl Clone for MarkdownTheme
impl Clone for MarkdownTheme
Source§fn clone(&self) -> MarkdownTheme
fn clone(&self) -> MarkdownTheme
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 Default for MarkdownTheme
impl Default for MarkdownTheme
Source§fn default() -> MarkdownTheme
fn default() -> MarkdownTheme
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for MarkdownTheme
impl !UnwindSafe for MarkdownTheme
impl Freeze for MarkdownTheme
impl Send for MarkdownTheme
impl Sync for MarkdownTheme
impl Unpin for MarkdownTheme
impl UnsafeUnpin for MarkdownTheme
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.