pub trait AppExt {
Show 17 methods
// Required methods
fn set_block_renderer(&mut self, renderer: BlockRenderer);
fn set_find_paint(&mut self, paint: FindPaint);
fn set_highlighter(
&mut self,
highlighter: Highlighter,
languages: impl IntoIterator<Item = impl Into<SharedString>>,
);
fn set_markdown_layout(&mut self, layout: Layout);
fn set_link_handler(&mut self, handler: LinkHandler);
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_link_preview(&mut self, preview: LinkPreview);
fn set_link_card(&mut self, card: LinkCard);
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_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_link_handler(&mut self, handler: LinkHandler)
fn set_link_handler(&mut self, handler: LinkHandler)
Handles link clicks; without a handler links use App::open_url.
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_link_preview(&mut self, preview: LinkPreview)
fn set_link_preview(&mut self, preview: LinkPreview)
Installs the provider for link cards, chips and embeds.
Sourcefn set_link_card(&mut self, card: LinkCard)
fn set_link_card(&mut self, card: LinkCard)
Installs the painter of cards for links the app owns.
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".