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§
- Comment
Thread - A comment thread (one parent comment; replies are flattened as extra comments sharing no parent — Word’s commentEx is out of scope).
- Create
Spec - A document specification.
- Docx
- An open DOCX document.
- Docx
Health - Full DOCX report.
- Docx
Info - Preflight counts.
- Edit
Builder - Builder for an edit batch.
- Edit
Options - Options for an edit batch.
- Edit
Outcome - Result of an edit batch.
- Edit
Report - Batch report.
- Hyperlink
- A hyperlink in a story part.
- OpReport
- Per-op status.
- Outline
Entry - Heading outline entry.
- Para
Props - Paragraph-level formatting.
- Para
Spec - One paragraph in a create spec.
- RunProps
- Character formatting applied to a run.
- RunSpec
- One run in a create spec.
- Search
Hit - One match.
- Search
Query - A search query.
- Search
Results - Search results.
- Section
Spec - One section of a create spec.
- Table
Spec - A table in a create spec.
- Track
Builder - Builder for a
TrackOpbatch. - Track
OpReport - Per-op status.
- Track
Options - Options for a
TrackOpbatch. - Track
Outcome - Result of a track batch.
- Track
Report - Batch report.
- Tracked
Change - A tracked insertion or deletion.
- View
Line - One line of the numbered view.
Enums§
- Docx
Error - 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
authorand optional ISOdate.
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.