README

bobzhang/docx2html/document does not have a README file

#
BreakType

pub(all) enum BreakType {
Line
Page
Column
} derive(Eq,
Debug
)

Kind of break represented in the document model.

#
BreakType::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn BreakType::equal(BreakType, BreakType) -> Bool

#
BreakType::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn BreakType::not_equal(x : BreakType, y : BreakType) -> Bool

#
BreakType::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn BreakType::to_repr(BreakType) ->
Repr

#
Comment

pub(all) struct Comment {
comment_id : String
body : Array[DocumentElement]
author_name : String
author_initials : String
} derive(Eq,
Debug
)

Word comment metadata and body content.

#
Comment::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Comment::equal(Comment, Comment) -> Bool

#
Comment::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Comment::not_equal(x : Comment, y : Comment) -> Bool

#
Comment::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Comment::to_repr(Comment) ->
Repr

#
DocumentElement

pub(all) enum DocumentElement {
Document(children~ : Array[DocumentElement], notes~ : Array[Note], comments~ : Array[Comment])
Paragraph(children~ : Array[DocumentElement], properties~ : ParagraphProperties)
Run(children~ : Array[DocumentElement], properties~ : RunProperties)
Text(String)
Tab
Checkbox(Bool)
Hyperlink(children~ : Array[DocumentElement], href~ : String?, anchor~ : String?, target_frame~ : String?)
NoteReference(note_type~ : String, note_id~ : String)
CommentReference(String)
Image(Image)
Table(children~ : Array[DocumentElement], properties~ : TableProperties)
TableRow(children~ : Array[DocumentElement], is_header~ : Bool)
TableCell(children~ : Array[DocumentElement], col_span~ : Int, row_span~ : Int)
Break(BreakType)
BookmarkStart(String)
} derive(Eq,
Debug
)

Node in the Mammoth-style document tree.

#
DocumentElement::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DocumentElement::equal(DocumentElement, DocumentElement) -> Bool

#
DocumentElement::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DocumentElement::not_equal(x : DocumentElement, y : DocumentElement) -> Bool

#
DocumentElement::to_raw_text

fn DocumentElement::to_raw_text(self : DocumentElement) -> String

Converts a document element to raw text.

#
DocumentElement::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DocumentElement::to_repr(DocumentElement) ->
Repr

#
DocumentSection

pub(all) struct DocumentSection {
ends_after_paragraph : Int?
headers : Array[SectionRef]
footers : Array[SectionRef]
} derive(Eq,
Debug
)

One document section. ends_after_paragraph is the 1-based index of the section's last direct body paragraph (a paragraph-level w:sectPr section break); None means the section runs to the end of the body. Indices count the raw body's direct paragraphs in document order. Every document has at least one section (the final section exists even without an explicit body-final w:sectPr). headers/footers are the section's EFFECTIVE references — OOXML inheritance applied: a section without an explicit reference for a variant uses the previous section's, and an explicit-but-unreadable reference blocks inheritance for that variant. Ordering is deterministic: explicit references in XML order, then inherited entries in the previous section's effective order.

#
DocumentSection::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DocumentSection::equal(DocumentSection, DocumentSection) -> Bool

#
DocumentSection::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DocumentSection::not_equal(x : DocumentSection, y : DocumentSection) -> Bool

#
DocumentSection::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DocumentSection::to_repr(DocumentSection) ->
Repr

#
HeaderFooterPart

pub(all) struct HeaderFooterPart {
body : Array[DocumentElement]
} derive(Eq,
Debug
)

One header or footer part: a block-level story like the body.

#
HeaderFooterPart::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HeaderFooterPart::equal(HeaderFooterPart, HeaderFooterPart) -> Bool

#
HeaderFooterPart::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HeaderFooterPart::not_equal(x : HeaderFooterPart, y : HeaderFooterPart) -> Bool

#
HeaderFooterPart::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HeaderFooterPart::to_repr(HeaderFooterPart) ->
Repr

#
Image

pub(all) struct Image {
content_type : String
alt_text : String?
data : Bytes
} derive(Eq,
Debug
)

Image payload and metadata read from a DOCX package.

#
Image::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Image::equal(Image, Image) -> Bool

#
Image::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Image::not_equal(x : Image, y : Image) -> Bool

#
Image::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Image::to_repr(Image) ->
Repr

#
Indent

pub(all) struct Indent {
start : String?
end : String?
first_line : String?
hanging : String?
} derive(Eq,
Debug
)

Paragraph indentation values from WordprocessingML.

#
Indent::default

fn Indent::default() -> Indent

Returns empty indentation metadata.

#
Indent::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Indent::equal(Indent, Indent) -> Bool

#
Indent::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Indent::not_equal(x : Indent, y : Indent) -> Bool

#
Indent::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Indent::to_repr(Indent) ->
Repr

#
Note

pub(all) struct Note {
note_type : String
note_id : String
body : Array[DocumentElement]
} derive(Eq,
Debug
)

Footnote or endnote content in the document model.

#
Note::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Note::equal(Note, Note) -> Bool

#
Note::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Note::not_equal(x : Note, y : Note) -> Bool

#
Note::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Note::to_repr(Note) ->
Repr

#
Numbering

pub(all) struct Numbering {
is_ordered : Bool
level : Int
} derive(Eq,
Debug
)

List numbering metadata attached to a paragraph.

#
Numbering::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Numbering::equal(Numbering, Numbering) -> Bool

#
Numbering::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Numbering::not_equal(x : Numbering, y : Numbering) -> Bool

#
Numbering::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Numbering::to_repr(Numbering) ->
Repr

#
ParagraphProperties

pub(all) struct ParagraphProperties {
style_id : String?
style_name : String?
numbering : Numbering?
alignment : String?
indent : Indent
} derive(Eq,
Debug
)

Formatting metadata attached to a paragraph.

#
ParagraphProperties::default

Returns default paragraph formatting metadata.

#
ParagraphProperties::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ParagraphProperties::equal(ParagraphProperties, ParagraphProperties) -> Bool

#
ParagraphProperties::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ParagraphProperties::not_equal(x : ParagraphProperties, y : ParagraphProperties) -> Bool

#
ParagraphProperties::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ParagraphProperties::to_repr(ParagraphProperties) ->
Repr

#
RunProperties

pub(all) struct RunProperties {
style_id : String?
style_name : String?
is_bold : Bool
is_underline : Bool
is_italic : Bool
is_strikethrough : Bool
is_all_caps : Bool
is_small_caps : Bool
vertical_alignment : VerticalAlignment
font : String?
font_size : Int?
highlight : String?
} derive(Eq,
Debug
)

Formatting metadata attached to a run.

#
RunProperties::default

fn RunProperties::default() -> RunProperties

Returns default run formatting metadata.

#
RunProperties::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn RunProperties::equal(RunProperties, RunProperties) -> Bool

#
RunProperties::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn RunProperties::not_equal(x : RunProperties, y : RunProperties) -> Bool

#
RunProperties::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn RunProperties::to_repr(RunProperties) ->
Repr

#
SectionRef

pub(all) struct SectionRef {
variant : String
part : Int
} derive(Eq,
Debug
)

A section's reference to a header/footer part. variant is the OOXML reference type (default, first, or even); part is a 0-based index into the package's headers or footers array (parts are shared — several sections may reference the same part).

#
SectionRef::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SectionRef::equal(SectionRef, SectionRef) -> Bool

#
SectionRef::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SectionRef::not_equal(x : SectionRef, y : SectionRef) -> Bool

#
SectionRef::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SectionRef::to_repr(SectionRef) ->
Repr

#
TableProperties

pub(all) struct TableProperties {
style_id : String?
style_name : String?
} derive(Eq,
Debug
)

Formatting metadata attached to a table.

#
TableProperties::default

Returns default table formatting metadata.

#
TableProperties::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn TableProperties::equal(TableProperties, TableProperties) -> Bool

#
TableProperties::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn TableProperties::not_equal(x : TableProperties, y : TableProperties) -> Bool

#
TableProperties::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn TableProperties::to_repr(TableProperties) ->
Repr

#
VerticalAlignment

pub(all) enum VerticalAlignment {
Baseline
Superscript
Subscript
} derive(Eq,
Debug
)

Vertical positioning for text within a run.

#
VerticalAlignment::equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn VerticalAlignment::equal(VerticalAlignment, VerticalAlignment) -> Bool

#
VerticalAlignment::not_equal

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn VerticalAlignment::not_equal(x : VerticalAlignment, y : VerticalAlignment) -> Bool

#
VerticalAlignment::to_repr

#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn VerticalAlignment::to_repr(VerticalAlignment) ->
Repr

#
bookmark_start

fn bookmark_start(name : String) -> DocumentElement

Builds a bookmark-start element.

#
checkbox

fn checkbox(checked : Bool) -> DocumentElement

Builds a checkbox element.

#
column_break

fn column_break() -> DocumentElement

Builds a column-break element.

#
comment

fn comment(comment_id : String, body : Array[DocumentElement], author_name? : String, author_initials? : String) -> Comment

Builds a document comment.

#
comment_reference

fn comment_reference(comment_id : String) -> DocumentElement

Builds a comment-reference element.

#
document

fn document(children : Array[DocumentElement], notes? : Array[Note], comments? : Array[Comment]) -> DocumentElement

Builds a document element.

#
document_descendants

fn document_descendants(element : DocumentElement) -> Array[DocumentElement]

Returns all descendants of a document element.

#
document_descendants_where

fn document_descendants_where(element : DocumentElement, predicate : (DocumentElement) -> Bool) -> Array[DocumentElement]

Returns descendants that satisfy a predicate.

#
extract_raw_text_from_document

fn extract_raw_text_from_document(document : DocumentElement) ->
ConversionResult

Extracts raw text from a document tree.
fn hyperlink(children : Array[DocumentElement], href? : String?, anchor? : String?, target_frame? : String?) -> DocumentElement

Builds a hyperlink element.

#
identity_document_transform

fn identity_document_transform(element : DocumentElement) -> DocumentElement

Returns a document element unchanged.

#
image

fn image(content_type : String, data : Bytes, alt_text? : String?) -> DocumentElement

Builds an image element.

#
indent

fn indent(start? : String?, end? : String?, first_line? : String?, hanging? : String?) -> Indent

Builds paragraph indentation metadata.

#
line_break

fn line_break() -> DocumentElement

Builds a line-break element.

#
note

fn note(note_type : String, note_id : String, body : Array[DocumentElement]) -> Note

Builds a footnote or endnote.

#
note_reference

fn note_reference(note_type : String, note_id : String) -> DocumentElement

Builds a note-reference element.

#
numbering

fn numbering(is_ordered : Bool, level : Int) -> Numbering

Builds paragraph numbering metadata.

#
page_break

fn page_break() -> DocumentElement

Builds a page-break element.

#
paragraph

fn paragraph(children : Array[DocumentElement], properties? : ParagraphProperties) -> DocumentElement

Builds a paragraph element.

#
paragraph_properties

fn paragraph_properties(style_id? : String?, style_name? : String?, numbering? : Numbering?, alignment? : String?, indent? : Indent) -> ParagraphProperties

Builds paragraph formatting metadata.

#
run

fn run(children : Array[DocumentElement], properties? : RunProperties) -> DocumentElement

Builds a run element.

#
run_properties

fn run_properties(style_id? : String?, style_name? : String?, is_bold? : Bool, is_underline? : Bool, is_italic? : Bool, is_strikethrough? : Bool, is_all_caps? : Bool, is_small_caps? : Bool, vertical_alignment? : VerticalAlignment, font? : String?, font_size? : Int?, highlight? : String?) -> RunProperties

Builds run formatting metadata.

#
tab

fn tab() -> DocumentElement

Builds a tab element.

#
table

fn table(children : Array[DocumentElement], properties? : TableProperties) -> DocumentElement

Builds a table element.

#
table_cell

fn table_cell(children : Array[DocumentElement], col_span? : Int, row_span? : Int) -> DocumentElement

Builds a table-cell element.

#
table_properties

fn table_properties(style_id? : String?, style_name? : String?) -> TableProperties

Builds table formatting metadata.

#
table_row

fn table_row(children : Array[DocumentElement], is_header? : Bool) -> DocumentElement

Builds a table-row element.

#
text

fn text(value : String) -> DocumentElement

Builds a text element.

#
transform_elements

fn transform_elements(element : DocumentElement, transform : (DocumentElement) -> DocumentElement) -> DocumentElement

Applies a transform recursively to document elements.

#
transform_paragraphs

fn transform_paragraphs(transform : (DocumentElement) -> DocumentElement) -> ((DocumentElement) -> DocumentElement)

Builds a transform that targets paragraph elements.

#
transform_runs

fn transform_runs(transform : (DocumentElement) -> DocumentElement) -> ((DocumentElement) -> DocumentElement)

Builds a transform that targets run elements.