pub struct Text {
pub content: String,
pub spans: Vec<TextSpan>,
pub style: Style,
pub bookmark: Option<String>,
pub break_before: BreakType,
pub fixed: bool,
pub wrap: Option<bool>,
pub min_presence_ahead: f32,
pub orphans: usize,
pub widows: usize,
}Expand description
Text content.
Use content for plain text or spans for mixed styling.
Fields§
§content: StringPlain text content (used when no spans)
spans: Vec<TextSpan>Inline spans for mixed-style text
style: StyleStyle for the text container (and default for spans)
bookmark: Option<String>Bookmark title (used for outlines)
break_before: BreakTypeWhether to break before this element
fixed: boolWhether this element is rendered on all pages (react-pdf fixed)
wrap: Option<bool>Whether this element can be split between pages (default: true)
min_presence_ahead: f32Desired minimum remaining presence (in points) after this element.
orphans: usizeMinimum number of lines kept at the start of a split text node.
widows: usizeMinimum number of lines kept at the end of a split text node.
Implementations§
Trait Implementations§
Source§impl From<TextBuilder> for Text
impl From<TextBuilder> for Text
Source§fn from(value: TextBuilder) -> Self
fn from(value: TextBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnsafeUnpin for Text
impl UnwindSafe for Text
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