pub struct Style<'a> {
Show 26 fields pub ty: Option<StyleType>, pub style_id: Cow<'a, str>, pub default: Option<bool>, pub custom_style: Option<bool>, pub name: Option<StyleName<'a>>, pub aliases: Option<Aliases<'a>>, pub base: Option<BasedOn<'a>>, pub next: Option<Next<'a>>, pub link: Option<Link<'a>>, pub auto_redefine: Option<AutoRedefine>, pub hidden: Option<Hidden>, pub priority: Option<Priority>, pub semi_hidden: Option<SemiHidden>, pub unhide_when_used: Option<UnhideWhenUsed>, pub q_format: Option<QFormat>, pub locked: Option<Locked>, pub personal: Option<Personal>, pub personal_compose: Option<PersonalCompose>, pub personal_reply: Option<PersonalReply>, pub rsid: Option<Rsid<'a>>, pub paragraph: Option<ParagraphProperty<'a>>, pub character: Option<CharacterProperty<'a>>, pub table: Option<TableProperty<'a>>, pub table_row: Option<TableRowProperty>, pub table_cell: Option<TableCellProperty>, pub conditional_table_property: Vec<ConditionalTableProperty<'a>>,
}
Expand description

Style

A style that applied to a region of the document.

use docx_rust::formatting::*;
use docx_rust::styles::*;

let style = Style::new(StyleType::Paragraph, "style_id")
    .name("Style Name")
    .paragraph(ParagraphProperty::default())
    .character(CharacterProperty::default());

Fields

ty: Option<StyleType>

Specifies the type of style.

style_id: Cow<'a, str>

Specifies the unique identifier

This identifier is used throughout the document to apply style in content.

default: Option<bool>custom_style: Option<bool>name: Option<StyleName<'a>>

Specifies the primary name

aliases: Option<Aliases<'a>>base: Option<BasedOn<'a>>next: Option<Next<'a>>

Style For Next Paragraph

link: Option<Link<'a>>auto_redefine: Option<AutoRedefine>hidden: Option<Hidden>priority: Option<Priority>

Specifies the priority.

semi_hidden: Option<SemiHidden>unhide_when_used: Option<UnhideWhenUsed>q_format: Option<QFormat>locked: Option<Locked>

Style Cannot Be Applied

personal: Option<Personal>

E-Mail Message Text Style

personal_compose: Option<PersonalCompose>

E-Mail Message Composition Style

personal_reply: Option<PersonalReply>

E-Mail Message Reply Style

rsid: Option<Rsid<'a>>paragraph: Option<ParagraphProperty<'a>>

Specifies a set of paragraph properties

character: Option<CharacterProperty<'a>>

Specifies a set of character properties

table: Option<TableProperty<'a>>table_row: Option<TableRowProperty>table_cell: Option<TableCellProperty>conditional_table_property: Vec<ConditionalTableProperty<'a>>

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

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.