Skip to main content

AppExt

Trait AppExt 

Source
pub trait AppExt {
Show 18 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_link_hover(&mut self, hover: LinkHover); 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§

Source

fn set_block_renderer(&mut self, renderer: BlockRenderer)

Installs the renderer for custom fenced blocks.

Source

fn set_find_paint(&mut self, paint: FindPaint)

Sets match and current washes; the callback keeps the current match stronger.

Source

fn set_highlighter( &mut self, highlighter: Highlighter, languages: impl IntoIterator<Item = impl Into<SharedString>>, )

Installs syntax highlighting and the language names offered by pickers.

Source

fn set_markdown_layout(&mut self, layout: Layout)

Configures markdown layout.

Handles link clicks; without a handler links use App::open_url.

Source

fn set_marks(&mut self, marks: Marks)

Installs the mark dialect shared by document readers and editors.

Source

fn set_mark_paint(&mut self, paint: Painter)

Installs custom mark paint without changing how marks are parsed.

Source

fn set_highlight_paint(&mut self, paint: HighlightPaint)

Sets the paint for reader highlights.

Installs the provider for link cards, chips and embeds.

Installs the painter of cards for links the app owns.

Installs the painter of hover cards for links the app owns.

Source

fn set_source_style(&mut self, style: impl Fn(&Theme) -> SourceStyle + 'static)

Resolves source styles against the current theme and refreshes windows.

Source

fn set_typography(&mut self, typography: Typography)

Sets the metrics used by document renderers.

Source

fn highlight_languages(&self) -> &[SharedString]

Reads highlight languages.

Source

fn markdown_layout(&self) -> Layout

Reads markdown layout.

Source

fn typography(&self) -> Typography

Reads typography.

Source

fn marks(&self) -> Marks

Reads marks.

Source

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".

Implementations on Foreign Types§

Source§

impl AppExt for App

Source§

fn set_block_renderer(&mut self, renderer: BlockRenderer)

Source§

fn set_find_paint(&mut self, paint: FindPaint)

Source§

fn set_highlighter( &mut self, highlighter: Highlighter, languages: impl IntoIterator<Item = impl Into<SharedString>>, )

Source§

fn set_markdown_layout(&mut self, layout: Layout)

Source§

fn set_marks(&mut self, marks: Marks)

Source§

fn set_mark_paint(&mut self, paint: Painter)

Source§

fn set_highlight_paint(&mut self, paint: HighlightPaint)

Source§

fn set_source_style(&mut self, style: impl Fn(&Theme) -> SourceStyle + 'static)

Source§

fn set_typography(&mut self, typography: Typography)

Source§

fn highlight_languages(&self) -> &[SharedString]

Source§

fn markdown_layout(&self) -> Layout

Source§

fn typography(&self) -> Typography

Source§

fn marks(&self) -> Marks

Source§

fn source_style(&self) -> SourceStyle

Implementors§