Skip to main content

RunProperties

Struct RunProperties 

Source
pub struct RunProperties {
Show 41 fields pub run_style: Option<Box<CTString>>, pub fonts: Option<Box<Fonts>>, pub bold: Option<Box<OnOffElement>>, pub b_cs: Option<Box<OnOffElement>>, pub italic: Option<Box<OnOffElement>>, pub i_cs: Option<Box<OnOffElement>>, pub caps: Option<Box<OnOffElement>>, pub small_caps: Option<Box<OnOffElement>>, pub strikethrough: Option<Box<OnOffElement>>, pub dstrike: Option<Box<OnOffElement>>, pub outline: Option<Box<OnOffElement>>, pub shadow: Option<Box<OnOffElement>>, pub emboss: Option<Box<OnOffElement>>, pub imprint: Option<Box<OnOffElement>>, pub no_proof: Option<Box<OnOffElement>>, pub snap_to_grid: Option<Box<OnOffElement>>, pub vanish: Option<Box<OnOffElement>>, pub web_hidden: Option<Box<OnOffElement>>, pub color: Option<Box<CTColor>>, pub spacing: Option<Box<SignedTwipsMeasureElement>>, pub width: Option<Box<TextScaleElement>>, pub kern: Option<Box<HpsMeasureElement>>, pub position: Option<Box<SignedHpsMeasureElement>>, pub size: Option<Box<HpsMeasureElement>>, pub size_complex_script: Option<Box<HpsMeasureElement>>, pub highlight: Option<Box<CTHighlight>>, pub underline: Option<Box<CTUnderline>>, pub effect: Option<Box<CTTextEffect>>, pub bdr: Option<Box<CTBorder>>, pub shading: Option<Box<CTShd>>, pub fit_text: Option<Box<CTFitText>>, pub vert_align: Option<Box<CTVerticalAlignRun>>, pub rtl: Option<Box<OnOffElement>>, pub cs: Option<Box<OnOffElement>>, pub em: Option<Box<CTEm>>, pub lang: Option<Box<LanguageElement>>, pub east_asian_layout: Option<Box<CTEastAsianLayout>>, pub spec_vanish: Option<Box<OnOffElement>>, pub o_math: Option<Box<OnOffElement>>, pub r_pr_change: Option<Box<CTRPrChange>>, pub extra_children: Vec<PositionedNode>,
}

Fields§

§run_style: Option<Box<CTString>>§fonts: Option<Box<Fonts>>§bold: Option<Box<OnOffElement>>§b_cs: Option<Box<OnOffElement>>§italic: Option<Box<OnOffElement>>§i_cs: Option<Box<OnOffElement>>§caps: Option<Box<OnOffElement>>§small_caps: Option<Box<OnOffElement>>§strikethrough: Option<Box<OnOffElement>>§dstrike: Option<Box<OnOffElement>>§outline: Option<Box<OnOffElement>>§shadow: Option<Box<OnOffElement>>§emboss: Option<Box<OnOffElement>>§imprint: Option<Box<OnOffElement>>§no_proof: Option<Box<OnOffElement>>§snap_to_grid: Option<Box<OnOffElement>>§vanish: Option<Box<OnOffElement>>§web_hidden: Option<Box<OnOffElement>>§color: Option<Box<CTColor>>§spacing: Option<Box<SignedTwipsMeasureElement>>§width: Option<Box<TextScaleElement>>§kern: Option<Box<HpsMeasureElement>>§position: Option<Box<SignedHpsMeasureElement>>§size: Option<Box<HpsMeasureElement>>§size_complex_script: Option<Box<HpsMeasureElement>>§highlight: Option<Box<CTHighlight>>§underline: Option<Box<CTUnderline>>§effect: Option<Box<CTTextEffect>>§bdr: Option<Box<CTBorder>>§shading: Option<Box<CTShd>>§fit_text: Option<Box<CTFitText>>§vert_align: Option<Box<CTVerticalAlignRun>>§rtl: Option<Box<OnOffElement>>§cs: Option<Box<OnOffElement>>§em: Option<Box<CTEm>>§lang: Option<Box<LanguageElement>>§east_asian_layout: Option<Box<CTEastAsianLayout>>§spec_vanish: Option<Box<OnOffElement>>§o_math: Option<Box<OnOffElement>>§r_pr_change: Option<Box<CTRPrChange>>§extra_children: Vec<PositionedNode>

Unknown child elements captured for roundtrip fidelity.

Trait Implementations§

Source§

impl Clone for RunProperties

Source§

fn clone(&self) -> RunProperties

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RunProperties

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RunProperties

Source§

fn default() -> RunProperties

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RunProperties

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl FromXml for RunProperties

Source§

fn from_xml<R: BufRead>( reader: &mut Reader<R>, start_tag: &BytesStart<'_>, is_empty: bool, ) -> Result<Self, ParseError>

Parse from an XML reader positioned at the start tag. Read more
Source§

impl RunPropertiesExt for RunProperties

Available on crate feature wml-styling only.
Source§

fn is_bold(&self) -> bool

Check if bold is enabled.
Source§

fn is_italic(&self) -> bool

Check if italic is enabled.
Source§

fn is_underline(&self) -> bool

Check if any underline is set (not none).
Source§

fn underline_style(&self) -> Option<&STUnderline>

Get the underline style.
Source§

fn is_strikethrough(&self) -> bool

Check if single strikethrough is enabled.
Source§

fn is_double_strikethrough(&self) -> bool

Check if double strikethrough is enabled.
Source§

fn is_all_caps(&self) -> bool

Check if all-caps is enabled.
Source§

fn is_small_caps(&self) -> bool

Check if small-caps is enabled.
Source§

fn is_hidden(&self) -> bool

Check if text is hidden (<w:vanish/>).
Source§

fn highlight_color(&self) -> Option<&STHighlightColor>

Get highlight color.
Source§

fn vertical_alignment(&self) -> Option<&STVerticalAlignRun>

Get vertical alignment (superscript/subscript/baseline).
Source§

fn is_superscript(&self) -> bool

Check if superscript.
Source§

fn is_subscript(&self) -> bool

Check if subscript.
Source§

fn font_size_half_points(&self) -> Option<u32>

Get font size in half-points (e.g., 24 = 12pt).
Source§

fn font_size_points(&self) -> Option<f64>

Get font size in points (e.g., 12.0).
Source§

fn color_hex(&self) -> Option<&str>

Get text color as hex string (e.g., “FF0000”).
Source§

fn style_id(&self) -> Option<&str>

Get the referenced character style ID.
Source§

fn font_ascii(&self) -> Option<&str>

Get the ASCII font name.
Source§

fn is_rtl(&self) -> bool

Check if right-to-left text.
Source§

fn is_outline(&self) -> bool

Check if outline text effect is enabled. ECMA-376 §17.3.2.23.
Source§

fn is_shadow(&self) -> bool

Check if shadow text effect is enabled. ECMA-376 §17.3.2.31.
Source§

fn is_emboss(&self) -> bool

Check if emboss text effect is enabled. ECMA-376 §17.3.2.13.
Source§

fn is_imprint(&self) -> bool

Check if imprint (engrave) text effect is enabled. ECMA-376 §17.3.2.18.
Source§

fn is_no_proof(&self) -> bool

Check if spell/grammar check is suppressed for this run. ECMA-376 §17.3.2.22.
Source§

fn is_snap_to_grid(&self) -> bool

Check if content snaps to document grid. ECMA-376 §17.3.2.34.
Source§

fn is_web_hidden(&self) -> bool

Check if text is hidden when rendered for the web view. ECMA-376 §17.3.2.44.
Source§

fn character_spacing(&self) -> Option<i64>

Get character spacing adjustment in twips (positive = expand, negative = condense). ECMA-376 §17.3.2.35.
Source§

fn text_scale_percent(&self) -> Option<u32>

Get text scale as a percentage (100 = normal width). ECMA-376 §17.3.2.43.
Source§

fn kerning(&self) -> Option<u32>

Get kerning threshold in half-points. ECMA-376 §17.3.2.19.
Source§

fn baseline_shift(&self) -> Option<i64>

Get baseline shift in half-points (positive = raise, negative = lower). ECMA-376 §17.3.2.28.
Source§

fn language(&self) -> Option<&LanguageElement>

Get language tag for this run. ECMA-376 §17.3.2.20.
Source§

impl Serialize for RunProperties

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ToXml for RunProperties

Source§

fn write_children<W: Write>( &self, writer: &mut Writer<W>, ) -> Result<(), SerializeError>

Write child elements and text content inside the element.
Source§

fn is_empty_element(&self) -> bool

Whether this element has no children (self-closing).
Source§

fn write_attrs<'a>(&self, start: BytesStart<'a>) -> BytesStart<'a>

Write attributes onto the start tag and return it.
Source§

fn write_element<W>( &self, tag: &str, writer: &mut Writer<W>, ) -> Result<(), SerializeError>
where W: Write,

Write a complete element: <tag attrs>children</tag> or <tag attrs/>.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,