pub struct Run {
pub text: String,
pub font_name: String,
pub font_size: f64,
pub bold: bool,
pub italic: bool,
}Expand description
A run of text with consistent formatting — the smallest unit emitted to the resulting DOCX.
A Paragraph is a sequence of one or more runs. A new run is started
whenever the layout detector observes a change in font, size, weight, or
style on the same line; consecutive characters with the same formatting
stay in a single run.
Fields§
§text: StringThe actual text content of this run, in source order. May contain any UTF-8 characters extracted from the PDF page.
font_name: StringPostScript name of the font as it appears in the PDF (e.g.
Helvetica, TimesNewRomanPS-BoldMT). Mapped to a Word font name
during DOCX writing.
font_size: f64Font size in PDF user-space points. Persisted to DOCX as half-points (Word’s native unit).
bold: boolWhether the run is rendered bold. Detected from font name suffix
(-Bold, Bd) or PDF font flags.
italic: boolWhether the run is rendered italic. Detected from font name suffix
(-Italic, It, Oblique) or PDF font flags.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Run
impl RefUnwindSafe for Run
impl Send for Run
impl Sync for Run
impl Unpin for Run
impl UnsafeUnpin for Run
impl UnwindSafe for Run
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,
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