pub struct CharacterProperty<'a> {
    pub style_id: Option<CharacterStyleId<'a>>,
    pub color: Option<Color<'a>>,
    pub fonts: Option<Fonts<'a>>,
    pub size: Option<Size>,
    pub lang: Option<Lang<'a>>,
    pub bold: Option<Bold>,
    pub italics: Option<Italics>,
    pub strike: Option<Strike>,
    pub dstrike: Option<Dstrike>,
    pub outline: Option<Outline>,
    pub underline: Option<Underline<'a>>,
}
Expand description

Character Property

use docx::formatting::{CharacterProperty, UnderlineStyle};

let prop = CharacterProperty::default()
    .style_id("foo")
    .color("00ff00")
    .color(0xff0000)
    .color((0x00, 0x00, 0xff))
    .size(42usize)
    .bold(true)
    .italics(false)
    .strike(true)
    .dstrike(false)
    .outline(true)
    .underline("00ff00")
    .underline(("ff0000", UnderlineStyle::Dash));

Fields

style_id: Option<CharacterStyleId<'a>>

Specifies the style ID of the character style.

color: Option<Color<'a>>

Specifies the color to be used to display text.

fonts: Option<Fonts<'a>>

Specifies the font.

size: Option<Size>

Specifies the font size in half points.

lang: Option<Lang<'a>>

Specifies the language to be used.

bold: Option<Bold>

Specifies that the text of the text run is to be bold.

italics: Option<Italics>

Specifies that the text of the text run is to be italics.

strike: Option<Strike>

Specifies that the contents are to be displayed with a horizontal line through the center of the line.

dstrike: Option<Dstrike>

Specifies that the contents are to be displayed with two horizontal lines through each character.

outline: Option<Outline>

Specifies that the content should be displayed as if it had an outline.

underline: Option<Underline<'a>>

Specifies that the content should be displayed with an underline

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.