Struct docx_rs::Docx

source ·
pub struct Docx {
Show 22 fields pub content_type: ContentTypes, pub rels: Rels, pub document_rels: DocumentRels, pub doc_props: DocProps, pub styles: Styles, pub document: Document, pub comments: Comments, pub numberings: Numberings, pub settings: Settings, pub font_table: FontTable, pub media: Vec<(String, Vec<u8>)>, pub comments_extended: CommentsExtended, pub web_settings: WebSettings, pub taskpanes: Option<Taskpanes>, pub taskpanes_rels: TaskpanesRels, pub web_extensions: Vec<WebExtension>, pub custom_items: Vec<CustomItem>, pub custom_item_props: Vec<CustomItemProperty>, pub custom_item_rels: Vec<CustomItemRels>, pub themes: Vec<Theme>, pub images: Vec<(String, String, Image, Png)>, pub hyperlinks: Vec<(String, String, String)>,
}

Fields§

§content_type: ContentTypes§rels: Rels§document_rels: DocumentRels§doc_props: DocProps§styles: Styles§document: Document§comments: Comments§numberings: Numberings§settings: Settings§font_table: FontTable§media: Vec<(String, Vec<u8>)>§comments_extended: CommentsExtended§web_settings: WebSettings§taskpanes: Option<Taskpanes>§taskpanes_rels: TaskpanesRels§web_extensions: Vec<WebExtension>§custom_items: Vec<CustomItem>§custom_item_props: Vec<CustomItemProperty>§custom_item_rels: Vec<CustomItemRels>§themes: Vec<Theme>§images: Vec<(String, String, Image, Png)>§hyperlinks: Vec<(String, String, String)>

Implementations§

source§

impl Docx

source

pub fn new() -> Docx

source

pub fn document(self, d: Document) -> Docx

source

pub fn styles(self, s: Styles) -> Self

source

pub fn add_style(self, s: Style) -> Self

source

pub fn numberings(self, n: Numberings) -> Self

source

pub fn settings(self, s: Settings) -> Self

source

pub fn comments(self, c: Comments) -> Self

source

pub fn comments_extended(self, c: CommentsExtended) -> Self

source

pub fn add_paragraph(self, p: Paragraph) -> Docx

source

pub fn add_structured_data_tag(self, t: StructuredDataTag) -> Docx

source

pub fn add_table_of_contents(self, t: TableOfContents) -> Docx

source

pub fn add_bookmark_start(self, id: usize, name: impl Into<String>) -> Docx

source

pub fn add_bookmark_end(self, id: usize) -> Docx

source

pub fn add_table(self, t: Table) -> Docx

source

pub fn header(self, header: Header) -> Self

source

pub fn first_header(self, header: Header) -> Self

source

pub fn even_header(self, header: Header) -> Self

source

pub fn footer(self, footer: Footer) -> Self

source

pub fn add_abstract_numbering(self, num: AbstractNumbering) -> Docx

source

pub fn add_numbering(self, num: Numbering) -> Docx

source

pub fn created_at(self, date: &str) -> Self

source

pub fn updated_at(self, date: &str) -> Self

source

pub fn custom_property( self, name: impl Into<String>, item: impl Into<String> ) -> Self

source

pub fn doc_id(self, id: &str) -> Self

source

pub fn default_tab_stop(self, stop: usize) -> Self

source

pub fn add_doc_var(self, name: &str, val: &str) -> Self

source

pub fn page_size(self, w: u32, h: u32) -> Self

source

pub fn page_margin(self, margin: PageMargin) -> Self

source

pub fn page_orient(self, o: PageOrientationType) -> Self

source

pub fn default_size(self, size: usize) -> Self

source

pub fn default_spacing(self, spacing: i32) -> Self

source

pub fn default_fonts(self, font: RunFonts) -> Self

source

pub fn default_line_spacing(self, spacing: LineSpacing) -> Self

source

pub fn taskpanes(self) -> Self

source

pub fn web_extension(self, ext: WebExtension) -> Self

source

pub fn add_custom_item(self, id: &str, xml: &str) -> Self

source

pub fn page_num_type(self, p: PageNumType) -> Self

source

pub fn build(self) -> XMLDocx

source

pub fn json(&self) -> String

source

pub fn json_with_update_comments(&mut self) -> String

Trait Implementations§

source§

impl Clone for Docx

source§

fn clone(&self) -> Docx

Returns a copy 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 Docx

source§

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

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

impl Default for Docx

source§

fn default() -> Self

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

impl Serialize for Docx

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

Auto Trait Implementations§

§

impl Freeze for Docx

§

impl RefUnwindSafe for Docx

§

impl Send for Docx

§

impl Sync for Docx

§

impl Unpin for Docx

§

impl UnwindSafe for Docx

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> 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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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.