pub struct Paragraph<'a> {
    pub rsid_r: Option<Cow<'a, str>>,
    pub rsid_r_default: Option<Cow<'a, str>>,
    pub property: Option<ParagraphProperty<'a>>,
    pub content: Vec<ParagraphContent<'a>>,
    pub shall_destroy: Option<bool>,
}
Expand description

Paragraph

Paragraph is the main block-level container for content.

use docx::document::*;
use docx::formatting::*;

let par = Paragraph::default()
    .property(ParagraphProperty::default())
    .push_text("hello,")
    .push_text((" world.", TextSpace::Preserve))
    .push(Run::default())
    .push(BookmarkStart::default())
    .push(BookmarkEnd::default());

Fields

rsid_r: Option<Cow<'a, str>>rsid_r_default: Option<Cow<'a, str>>property: Option<ParagraphProperty<'a>>

Specifies the properties of a paragraph

This information is applied to all the contents of the paragraph.

content: Vec<ParagraphContent<'a>>

Specifes the run contents of a paragraph

Run is a region of text with properties. Each paragraph containes one or more runs.

shall_destroy: Option<bool>

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

Converts to this type from the input type.

Converts to this type from the input type.

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.