pub struct CalloutStyle {
pub background: ColorRgb,
pub border: ColorRgb,
pub accent: ColorRgb,
pub decoration: CalloutDecoration,
pub label: String,
pub label_color: Option<ColorRgb>,
pub label_centered: bool,
pub icon: String,
pub font_families: Vec<String>,
}Fields§
§background: ColorRgb§border: ColorRgb§accent: ColorRgbLeft accent bar colour. Drawn as a thicker stripe on the left side
of the box (decoration = "box"), or as the rule colour
(decoration = "rules").
decoration: CalloutDecorationHow the callout is framed. Defaults to a filled box.
label: StringOptional bold heading drawn as the first line of the box (e.g.
"WARNING"). Empty / unset renders no label, preserving the
plain-box behaviour. Typically uppercase.
label_color: Option<ColorRgb>Colour for the label. Defaults to the document body text
colour; set it (e.g. to the accent) to tint the heading.
label_centered: boolCentre the label across the content column instead of left-aligning it. Used by the bulletin layout.
icon: StringOptional icon asset (any AssetResolver URI / path) drawn at the
box’s top-left, with the label and body indented past it. Empty /
unset renders no icon.
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.
Trait Implementations§
Source§impl Clone for CalloutStyle
impl Clone for CalloutStyle
Source§impl Debug for CalloutStyle
impl Debug for CalloutStyle
Source§impl Default for CalloutStyle
impl Default for CalloutStyle
Source§impl<'de> Deserialize<'de> for CalloutStylewhere
CalloutStyle: Default,
impl<'de> Deserialize<'de> for CalloutStylewhere
CalloutStyle: 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 CalloutStyle
impl Freeze for CalloutStyle
impl Move for CalloutStyle
impl RefUnwindSafe for CalloutStyle
impl Send for CalloutStyle
impl Sync for CalloutStyle
impl Unpin for CalloutStyle
impl UnsafeUnpin for CalloutStyle
impl UnwindSafe for CalloutStyle
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.