pub struct DisplaySettings {
pub show_line_numbers: bool,
pub show_document_line_numbers: bool,
pub code_block_theme: CodeBlockTheme,
pub show_heading_collapse: bool,
pub scroll_multiplier: usize,
}Expand description
Display settings for markdown rendering.
Controls visual options like line numbers, themes, and collapse indicators.
Fields§
§show_line_numbers: boolWhether to show line numbers in code blocks.
show_document_line_numbers: boolWhether to show line numbers for the entire document.
code_block_theme: CodeBlockThemeColor theme for code blocks.
show_heading_collapse: boolWhether to show collapse indicators on headings.
scroll_multiplier: usizeScroll multiplier (lines per scroll tick).
Implementations§
Source§impl DisplaySettings
impl DisplaySettings
Sourcepub fn new() -> DisplaySettings
Available on crate feature markdown-preview only.
pub fn new() -> DisplaySettings
markdown-preview only.Create new display settings with defaults.
Sourcepub fn set_code_block_theme(&mut self, theme: CodeBlockTheme) -> bool
Available on crate feature markdown-preview only.
pub fn set_code_block_theme(&mut self, theme: CodeBlockTheme) -> bool
markdown-preview only.Sourcepub fn set_scroll_multiplier(&mut self, multiplier: usize) -> bool
Available on crate feature markdown-preview only.
pub fn set_scroll_multiplier(&mut self, multiplier: usize) -> bool
markdown-preview only.Sourcepub fn scroll_multiplier(&self) -> usize
Available on crate feature markdown-preview only.
pub fn scroll_multiplier(&self) -> usize
markdown-preview only.Get the current scroll multiplier.
Sourcepub fn set_show_document_line_numbers(&mut self, show: bool) -> bool
Available on crate feature markdown-preview only.
pub fn set_show_document_line_numbers(&mut self, show: bool) -> bool
markdown-preview only.Sourcepub fn set_show_heading_collapse(&mut self, show: bool) -> bool
Available on crate feature markdown-preview only.
pub fn set_show_heading_collapse(&mut self, show: bool) -> bool
markdown-preview only.Trait Implementations§
Source§impl Clone for DisplaySettings
impl Clone for DisplaySettings
Source§fn clone(&self) -> DisplaySettings
fn clone(&self) -> DisplaySettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DisplaySettings
impl Debug for DisplaySettings
Source§impl Default for DisplaySettings
impl Default for DisplaySettings
Source§fn default() -> DisplaySettings
fn default() -> DisplaySettings
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DisplaySettings
impl RefUnwindSafe for DisplaySettings
impl Send for DisplaySettings
impl Sync for DisplaySettings
impl Unpin for DisplaySettings
impl UnsafeUnpin for DisplaySettings
impl UnwindSafe for DisplaySettings
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> 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 more