pub trait AppExt {
Show 16 methods
// Required methods
fn set_block_renderer(&mut self, renderer: BlockRenderer);
fn set_find_paint(&mut self, paint: FindPaint);
fn set_comment_paint(&mut self, paint: CommentPaint);
fn set_highlighter(
&mut self,
highlighter: Highlighter,
languages: impl IntoIterator<Item = impl Into<SharedString>>,
);
fn set_markdown_layout(&mut self, layout: Layout);
fn set_links<L: Links>(&mut self);
fn set_marks(&mut self, marks: Marks);
fn set_mark_paint(&mut self, paint: Painter);
fn set_highlight_paint(&mut self, paint: HighlightPaint);
fn set_source_style(
&mut self,
style: impl Fn(&Theme) -> SourceStyle + 'static,
);
fn set_typography(&mut self, typography: Typography);
fn highlight_languages(&self) -> &[SharedString];
fn markdown_layout(&self) -> Layout;
fn typography(&self) -> Typography;
fn marks(&self) -> Marks;
fn source_style(&self) -> SourceStyle;
}Expand description
Configuration carried by the application. Import as use markdown::AppExt as _;.
Required Methods§
Sourcefn set_block_renderer(&mut self, renderer: BlockRenderer)
fn set_block_renderer(&mut self, renderer: BlockRenderer)
Installs the renderer for custom fenced blocks.
Sourcefn set_find_paint(&mut self, paint: FindPaint)
fn set_find_paint(&mut self, paint: FindPaint)
Sets match and current washes; the callback keeps the current match stronger.
Sourcefn set_comment_paint(&mut self, paint: CommentPaint)
fn set_comment_paint(&mut self, paint: CommentPaint)
Sets the washes behind comment ranges.
Sourcefn set_highlighter(
&mut self,
highlighter: Highlighter,
languages: impl IntoIterator<Item = impl Into<SharedString>>,
)
fn set_highlighter( &mut self, highlighter: Highlighter, languages: impl IntoIterator<Item = impl Into<SharedString>>, )
Installs syntax highlighting and the language names offered by pickers.
Sourcefn set_markdown_layout(&mut self, layout: Layout)
fn set_markdown_layout(&mut self, layout: Layout)
Configures markdown layout.
Sourcefn set_links<L: Links>(&mut self)
fn set_links<L: Links>(&mut self)
Installs what the app does with links — see crate::Links.
Sourcefn set_marks(&mut self, marks: Marks)
fn set_marks(&mut self, marks: Marks)
Installs the mark dialect shared by document readers and editors.
Sourcefn set_mark_paint(&mut self, paint: Painter)
fn set_mark_paint(&mut self, paint: Painter)
Installs custom mark paint without changing how marks are parsed.
Sourcefn set_highlight_paint(&mut self, paint: HighlightPaint)
fn set_highlight_paint(&mut self, paint: HighlightPaint)
Sets the paint for reader highlights.
Sourcefn set_source_style(&mut self, style: impl Fn(&Theme) -> SourceStyle + 'static)
fn set_source_style(&mut self, style: impl Fn(&Theme) -> SourceStyle + 'static)
Resolves source styles against the current theme and refreshes windows.
Sourcefn set_typography(&mut self, typography: Typography)
fn set_typography(&mut self, typography: Typography)
Sets the metrics used by document renderers.
Sourcefn highlight_languages(&self) -> &[SharedString]
fn highlight_languages(&self) -> &[SharedString]
Reads highlight languages.
Sourcefn markdown_layout(&self) -> Layout
fn markdown_layout(&self) -> Layout
Reads markdown layout.
Sourcefn typography(&self) -> Typography
fn typography(&self) -> Typography
Reads typography.
Sourcefn source_style(&self) -> SourceStyle
fn source_style(&self) -> SourceStyle
Reads source style.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".