pub struct StyleMatch {Show 15 fields
pub margins: Margins,
pub heading_1: BasicTextStyle,
pub heading_2: BasicTextStyle,
pub heading_3: BasicTextStyle,
pub emphasis: BasicTextStyle,
pub strong_emphasis: BasicTextStyle,
pub code: BasicTextStyle,
pub block_quote: BasicTextStyle,
pub list_item: BasicTextStyle,
pub link: BasicTextStyle,
pub image: BasicTextStyle,
pub text: BasicTextStyle,
pub table_header: BasicTextStyle,
pub table_cell: BasicTextStyle,
pub horizontal_rule: BasicTextStyle,
}Expand description
Main style configuration for mapping markdown elements to PDF styles.
This struct contains style definitions for each markdown element type that can appear in the document. It is used by the PDF renderer to determine how to format each element.
Fields§
§margins: MarginsDocument margins
heading_1: BasicTextStyleStyle for level 1 headings (#)
heading_2: BasicTextStyleStyle for level 2 headings (##)
heading_3: BasicTextStyleStyle for level 3 headings (###)
emphasis: BasicTextStyleStyle for emphasized text (text or text)
strong_emphasis: BasicTextStyleStyle for strongly emphasized text (text or text)
code: BasicTextStyleStyle for inline code (code)
block_quote: BasicTextStyleStyle for block quotes (> quote)
list_item: BasicTextStyleStyle for list items (- item or * item)
link: BasicTextStyleStyle for links (text)
image: BasicTextStyleStyle for images ()
text: BasicTextStyleStyle for regular text
table_header: BasicTextStyleStyle for table headers
table_cell: BasicTextStyleStyle for table cells
horizontal_rule: BasicTextStyleStyle for horizontal rules (—)
Trait Implementations§
Source§impl Default for StyleMatch
Creates a StyleMatch with default styling settings.
impl Default for StyleMatch
Creates a StyleMatch with default styling settings.
The default style provides a clean, readable layout with hierarchical heading sizes, appropriate base font sizes, and consistent spacing throughout the document. It sets up styling for all supported markdown elements including headings, emphasis, code blocks, quotes, lists and more.
Auto Trait Implementations§
impl Freeze for StyleMatch
impl RefUnwindSafe for StyleMatch
impl Send for StyleMatch
impl Sync for StyleMatch
impl Unpin for StyleMatch
impl UnwindSafe for StyleMatch
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.