Skip to main content

Crate blackline_docx

Crate blackline_docx 

Source
Expand description

§blackline-docx

Read, search, edit, redline, track, create, and validate DOCX documents. The XML in the package is the document — nothing is converted to HTML.

use blackline_docx::{Docx, SearchQuery};

let doc = Docx::from_paragraphs(&["Hello", "World"])?;
let hits = doc.search(&SearchQuery::new("Hello"))?;
assert_eq!(hits.total, 1);

Structs§

CommentThread
A comment thread (one parent comment; replies are flattened as extra comments sharing no parent — Word’s commentEx is out of scope).
CreateSpec
A document specification.
Docx
An open DOCX document.
DocxHealth
Full DOCX report.
DocxInfo
Preflight counts.
EditBuilder
Builder for an edit batch.
EditOptions
Options for an edit batch.
EditOutcome
Result of an edit batch.
EditReport
Batch report.
Hyperlink
A hyperlink in a story part.
OpReport
Per-op status.
OutlineEntry
Heading outline entry.
ParaProps
Paragraph-level formatting.
ParaSpec
One paragraph in a create spec.
RunProps
Character formatting applied to a run.
RunSpec
One run in a create spec.
SearchHit
One match.
SearchQuery
A search query.
SearchResults
Search results.
SectionSpec
One section of a create spec.
TableSpec
A table in a create spec.
TrackBuilder
Builder for a TrackOp batch.
TrackOpReport
Per-op status.
TrackOptions
Options for a TrackOp batch.
TrackOutcome
Result of a track batch.
TrackReport
Batch report.
TrackedChange
A tracked insertion or deletion.
ViewLine
One line of the numbered view.

Enums§

DocxError
Errors produced by the DOCX crate.
EditOp
A single edit operation.
Granularity
How tightly a tracked replacement / redline is chunked.
TrackOp
One track / redline operation. Each mutating op may carry its own author and optional ISO date.

Constants§

DEFAULT_LIMIT
Default match cap.

Functions§

redline
Compare two documents into a redlined third.
track_redline
Compare two documents into a redlined third using diff_minimal.