pub struct ListSectionStyle {
pub enabled: bool,
pub position: TocPosition,
pub title: Option<String>,
pub title_font_size: f32,
pub entry_font_size: f32,
pub entry_space_after: f32,
pub font_families: Vec<String>,
}Expand description
Generic auto-generated list section: List of Figures, List of
Tables. Same shape as a TOC but flat (no level indenting). The
title field is optional so callers can omit it from TOML and let
the renderer pick a sensible default per section (“List of Figures”
for lof, “List of Tables” for lot).
Fields§
§enabled: bool§position: TocPosition§title: Option<String>§title_font_size: f32§entry_font_size: f32§entry_space_after: f32§font_families: Vec<String>Font families for this element, in fallback order. Empty means
“inherit the document body families” (body_font_families, or
the bundled Noto defaults when that is also empty). Names must
be families the font collection knows — either system-installed
or exposed by a file listed in font_paths.
Note this REPLACES the body list rather than extending it, so a Latin-only face here will lose the multi-script fallbacks. List the scripts you need explicitly if the document is not Latin-only.
Implementations§
Source§impl ListSectionStyle
impl ListSectionStyle
Sourcepub fn resolved_title<'a>(&'a self, fallback: &'a str) -> &'a str
pub fn resolved_title<'a>(&'a self, fallback: &'a str) -> &'a str
Title to display, falling back to the supplied default when the caller didn’t override it.
Trait Implementations§
Source§impl Clone for ListSectionStyle
impl Clone for ListSectionStyle
Source§impl Debug for ListSectionStyle
impl Debug for ListSectionStyle
Source§impl Default for ListSectionStyle
impl Default for ListSectionStyle
Source§impl<'de> Deserialize<'de> for ListSectionStylewhere
ListSectionStyle: Default,
impl<'de> Deserialize<'de> for ListSectionStylewhere
ListSectionStyle: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for ListSectionStyle
impl Freeze for ListSectionStyle
impl Move for ListSectionStyle
impl RefUnwindSafe for ListSectionStyle
impl Send for ListSectionStyle
impl Sync for ListSectionStyle
impl Unpin for ListSectionStyle
impl UnsafeUnpin for ListSectionStyle
impl UnwindSafe for ListSectionStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§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.