Expand description
Shared test setup utilities for text-document crate tests.
Provides helpers to create an in-memory document with content,
export text, and traverse the entity tree. This crate depends only
on common and direct_access — it reimplements plain-text import
and export directly via entity controllers, so it does not depend
on document_io or any feature crate, breaking the circular
dev-dependency chain.
Modules§
- block_
controller - document_
controller - frame_
controller - inline_
element_ controller - root_
controller - table_
cell_ controller - table_
controller
Structs§
- Basic
Stats - Basic document statistics retrieved directly from entity data.
- Create
Block Dto - Create
Document Dto - Create
Frame Dto - Create
Inline Element Dto - Create
Root Dto - Table
Cell Dto - Table
Dto
Enums§
- Block
Relationship Field - Document
Relationship Field - Frame
Relationship Field - Root
Relationship Field - Table
Cell Relationship Field - Table
Relationship Field
Functions§
- export_
text - Export the current document as plain text by reading blocks and
concatenating their
plain_textfields with\nseparators. - get_
all_ block_ ids - Get all block IDs across all frames in the document (not just the first frame).
- get_
block_ ids - Get the first frame’s block IDs.
- get_
document_ stats - Get basic document statistics by reading the Document entity directly.
- get_
element_ ids - Get the element IDs for a given block.
- get_
first_ block_ element_ ids - Get the first block’s element IDs.
- get_
frame_ id - Get the first frame ID for the document.
- get_
sorted_ cells - Get all cells for a table, sorted by row then column.
- get_
table_ cell_ ids - Get all cell IDs for a given table.
- get_
table_ ids - Get all table IDs in the document.
- setup
- Create an in-memory database with a Root and empty Document.
- setup_
with_ text - Create an in-memory database with a Root, Document, and imported text content.