pub struct DocApi<'a, I: Invoker> { /* private fields */ }Implementations§
Source§impl<'a, I: Invoker> DocApi<'a, I>
impl<'a, I: Invoker> DocApi<'a, I>
pub fn new(invoker: &'a I) -> Self
pub fn blocks(&self) -> DocApiBlocks<'a, I>
pub fn bookmarks(&self) -> DocApiBookmarks<'a, I>
pub fn capabilities(&self) -> DocApiCapabilities<'a, I>
pub fn captions(&self) -> DocApiCaptions<'a, I>
pub fn citations(&self) -> DocApiCitations<'a, I>
pub fn clipboard(&self) -> DocApiClipboard<'a, I>
pub fn comments(&self) -> DocApiComments<'a, I>
pub fn content_controls(&self) -> DocApiContentControls<'a, I>
pub fn create(&self) -> DocApiCreate<'a, I>
pub fn cross_refs(&self) -> DocApiCrossRefs<'a, I>
pub fn custom_xml(&self) -> DocApiCustomXml<'a, I>
pub fn diff(&self) -> DocApiDiff<'a, I>
pub fn export(&self) -> DocApiExport<'a, I>
pub fn fields(&self) -> DocApiFields<'a, I>
pub fn footnotes(&self) -> DocApiFootnotes<'a, I>
pub fn format(&self) -> DocApiFormat<'a, I>
pub fn history(&self) -> DocApiHistory<'a, I>
pub fn hyperlinks(&self) -> DocApiHyperlinks<'a, I>
pub fn images(&self) -> DocApiImages<'a, I>
pub fn index(&self) -> DocApiIndex<'a, I>
pub fn lists(&self) -> DocApiLists<'a, I>
pub fn metadata(&self) -> DocApiMetadata<'a, I>
pub fn mutations(&self) -> DocApiMutations<'a, I>
pub fn permission_ranges(&self) -> DocApiPermissionRanges<'a, I>
pub fn plan(&self) -> DocApiPlan<'a, I>
pub fn preset(&self) -> DocApiPreset<'a, I>
pub fn protection(&self) -> DocApiProtection<'a, I>
pub fn query(&self) -> DocApiQuery<'a, I>
pub fn ranges(&self) -> DocApiRanges<'a, I>
pub fn sections(&self) -> DocApiSections<'a, I>
pub fn selection(&self) -> DocApiSelection<'a, I>
pub fn styles(&self) -> DocApiStyles<'a, I>
pub fn tables(&self) -> DocApiTables<'a, I>
pub fn templates(&self) -> DocApiTemplates<'a, I>
pub fn toc(&self) -> DocApiToc<'a, I>
pub fn track_changes(&self) -> DocApiTrackChanges<'a, I>
pub fn watermarks(&self) -> DocApiWatermarks<'a, I>
Sourcepub fn clear_content<'call>(
&'call self,
params: &'call DocClearContentBoundParams,
) -> impl Future<Output = Result<DocClearContentResult>> + Send + 'call
pub fn clear_content<'call>( &'call self, params: &'call DocClearContentBoundParams, ) -> impl Future<Output = Result<DocClearContentResult>> + Send + 'call
Clear all document body content, leaving a single empty paragraph.
Sourcepub async fn clear_content_with_options(
&self,
params: &DocClearContentBoundParams,
options: InvokeOptions,
) -> Result<DocClearContentResult>
pub async fn clear_content_with_options( &self, params: &DocClearContentBoundParams, options: InvokeOptions, ) -> Result<DocClearContentResult>
Clear all document body content, leaving a single empty paragraph.
Sourcepub fn close<'call>(
&'call self,
params: &'call DocCloseBoundParams,
) -> impl Future<Output = Result<DocCloseResult>> + Send + 'call
pub fn close<'call>( &'call self, params: &'call DocCloseBoundParams, ) -> impl Future<Output = Result<DocCloseResult>> + Send + 'call
Close the active editing session and clean up resources.
Sourcepub async fn close_with_options(
&self,
params: &DocCloseBoundParams,
options: InvokeOptions,
) -> Result<DocCloseResult>
pub async fn close_with_options( &self, params: &DocCloseBoundParams, options: InvokeOptions, ) -> Result<DocCloseResult>
Close the active editing session and clean up resources.
Sourcepub fn delete<'call>(
&'call self,
params: &'call DocDeleteBoundParams,
) -> impl Future<Output = Result<DocDeleteResult>> + Send + 'call
pub fn delete<'call>( &'call self, params: &'call DocDeleteBoundParams, ) -> impl Future<Output = Result<DocDeleteResult>> + Send + 'call
Delete content at a contiguous document selection. Accepts a SelectionTarget or mutation-ready ref. Supports cross-block deletion and optional block-edge expansion via behavior mode.
Sourcepub async fn delete_with_options(
&self,
params: &DocDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocDeleteResult>
pub async fn delete_with_options( &self, params: &DocDeleteBoundParams, options: InvokeOptions, ) -> Result<DocDeleteResult>
Delete content at a contiguous document selection. Accepts a SelectionTarget or mutation-ready ref. Supports cross-block deletion and optional block-edge expansion via behavior mode.
Sourcepub fn execute_code<'call>(
&'call self,
params: &'call DocExecuteCodeBoundParams,
) -> impl Future<Output = Result<DocExecuteCodeResult>> + Send + 'call
pub fn execute_code<'call>( &'call self, params: &'call DocExecuteCodeBoundParams, ) -> impl Future<Output = Result<DocExecuteCodeResult>> + Send + 'call
Run model-authored JavaScript IN-HOST against the live, SYNCHRONOUS Document API for the open session. Two globals are injected: doc (the synchronous Document API; do NOT await doc.* calls) and console. return a short summary; logs and the return value come back structured as { ok, result, logs, error }. Use for complex/multi-step workflows (loops, per-item branching, extract-then-generate) in ONE call instead of chaining many narrow tools. Large code can be passed on stdin.
Sourcepub async fn execute_code_with_options(
&self,
params: &DocExecuteCodeBoundParams,
options: InvokeOptions,
) -> Result<DocExecuteCodeResult>
pub async fn execute_code_with_options( &self, params: &DocExecuteCodeBoundParams, options: InvokeOptions, ) -> Result<DocExecuteCodeResult>
Run model-authored JavaScript IN-HOST against the live, SYNCHRONOUS Document API for the open session. Two globals are injected: doc (the synchronous Document API; do NOT await doc.* calls) and console. return a short summary; logs and the return value come back structured as { ok, result, logs, error }. Use for complex/multi-step workflows (loops, per-item branching, extract-then-generate) in ONE call instead of chaining many narrow tools. Large code can be passed on stdin.
Sourcepub fn extract<'call>(
&'call self,
params: &'call DocExtractBoundParams,
) -> impl Future<Output = Result<DocExtractResult>> + Send + 'call
pub fn extract<'call>( &'call self, params: &'call DocExtractBoundParams, ) -> impl Future<Output = Result<DocExtractResult>> + Send + 'call
Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes: each with an ID compatible with scrollToElement().
Sourcepub async fn extract_with_options(
&self,
params: &DocExtractBoundParams,
options: InvokeOptions,
) -> Result<DocExtractResult>
pub async fn extract_with_options( &self, params: &DocExtractBoundParams, options: InvokeOptions, ) -> Result<DocExtractResult>
Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes: each with an ID compatible with scrollToElement().
Sourcepub fn find<'call>(
&'call self,
params: &'call DocFindBoundParams,
) -> impl Future<Output = Result<DocFindResult>> + Send + 'call
pub fn find<'call>( &'call self, params: &'call DocFindBoundParams, ) -> impl Future<Output = Result<DocFindResult>> + Send + 'call
Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead.
Sourcepub async fn find_with_options(
&self,
params: &DocFindBoundParams,
options: InvokeOptions,
) -> Result<DocFindResult>
pub async fn find_with_options( &self, params: &DocFindBoundParams, options: InvokeOptions, ) -> Result<DocFindResult>
Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead.
Sourcepub fn format_range<'call>(
&'call self,
params: &'call DocFormatRangeBoundParams,
) -> impl Future<Output = Result<DocFormatRangeResult>> + Send + 'call
pub fn format_range<'call>( &'call self, params: &'call DocFormatRangeBoundParams, ) -> impl Future<Output = Result<DocFormatRangeResult>> + Send + 'call
Legacy root-level alias for inline range formatting. Routes to format.apply for compatibility with older callers.
Sourcepub async fn format_range_with_options(
&self,
params: &DocFormatRangeBoundParams,
options: InvokeOptions,
) -> Result<DocFormatRangeResult>
pub async fn format_range_with_options( &self, params: &DocFormatRangeBoundParams, options: InvokeOptions, ) -> Result<DocFormatRangeResult>
Legacy root-level alias for inline range formatting. Routes to format.apply for compatibility with older callers.
Sourcepub fn get<'call>(
&'call self,
params: &'call DocGetBoundParams,
) -> impl Future<Output = Result<DocGetResult>> + Send + 'call
pub fn get<'call>( &'call self, params: &'call DocGetBoundParams, ) -> impl Future<Output = Result<DocGetResult>> + Send + 'call
Read the full document as an SDDocument structure.
Sourcepub async fn get_with_options(
&self,
params: &DocGetBoundParams,
options: InvokeOptions,
) -> Result<DocGetResult>
pub async fn get_with_options( &self, params: &DocGetBoundParams, options: InvokeOptions, ) -> Result<DocGetResult>
Read the full document as an SDDocument structure.
Sourcepub fn get_html<'call>(
&'call self,
params: &'call DocGetHtmlBoundParams,
) -> impl Future<Output = Result<DocGetHtmlResult>> + Send + 'call
pub fn get_html<'call>( &'call self, params: &'call DocGetHtmlBoundParams, ) -> impl Future<Output = Result<DocGetHtmlResult>> + Send + 'call
Extract the document content as an HTML string.
Sourcepub async fn get_html_with_options(
&self,
params: &DocGetHtmlBoundParams,
options: InvokeOptions,
) -> Result<DocGetHtmlResult>
pub async fn get_html_with_options( &self, params: &DocGetHtmlBoundParams, options: InvokeOptions, ) -> Result<DocGetHtmlResult>
Extract the document content as an HTML string.
Sourcepub fn get_markdown<'call>(
&'call self,
params: &'call DocGetMarkdownBoundParams,
) -> impl Future<Output = Result<DocGetMarkdownResult>> + Send + 'call
pub fn get_markdown<'call>( &'call self, params: &'call DocGetMarkdownBoundParams, ) -> impl Future<Output = Result<DocGetMarkdownResult>> + Send + 'call
Extract the document content as a Markdown string.
Sourcepub async fn get_markdown_with_options(
&self,
params: &DocGetMarkdownBoundParams,
options: InvokeOptions,
) -> Result<DocGetMarkdownResult>
pub async fn get_markdown_with_options( &self, params: &DocGetMarkdownBoundParams, options: InvokeOptions, ) -> Result<DocGetMarkdownResult>
Extract the document content as a Markdown string.
Sourcepub fn get_node<'call>(
&'call self,
params: &'call DocGetNodeBoundParams,
) -> impl Future<Output = Result<DocGetNodeResult>> + Send + 'call
pub fn get_node<'call>( &'call self, params: &'call DocGetNodeBoundParams, ) -> impl Future<Output = Result<DocGetNodeResult>> + Send + 'call
Retrieve a single node by target position.
Sourcepub async fn get_node_with_options(
&self,
params: &DocGetNodeBoundParams,
options: InvokeOptions,
) -> Result<DocGetNodeResult>
pub async fn get_node_with_options( &self, params: &DocGetNodeBoundParams, options: InvokeOptions, ) -> Result<DocGetNodeResult>
Retrieve a single node by target position.
Sourcepub fn get_node_by_id<'call>(
&'call self,
params: &'call DocGetNodeByIdBoundParams,
) -> impl Future<Output = Result<DocGetNodeByIdResult>> + Send + 'call
pub fn get_node_by_id<'call>( &'call self, params: &'call DocGetNodeByIdBoundParams, ) -> impl Future<Output = Result<DocGetNodeByIdResult>> + Send + 'call
Resolve a block ID across the body, linked headers/footers, and supported textboxes, optionally restricted by story. Paragraphs at every table-cell depth and top-level body/header/footer tables are supported; notes, comments, glossary, and nested table containers are excluded.
Sourcepub async fn get_node_by_id_with_options(
&self,
params: &DocGetNodeByIdBoundParams,
options: InvokeOptions,
) -> Result<DocGetNodeByIdResult>
pub async fn get_node_by_id_with_options( &self, params: &DocGetNodeByIdBoundParams, options: InvokeOptions, ) -> Result<DocGetNodeByIdResult>
Resolve a block ID across the body, linked headers/footers, and supported textboxes, optionally restricted by story. Paragraphs at every table-cell depth and top-level body/header/footer tables are supported; notes, comments, glossary, and nested table containers are excluded.
Sourcepub fn get_text<'call>(
&'call self,
params: &'call DocGetTextBoundParams,
) -> impl Future<Output = Result<DocGetTextResult>> + Send + 'call
pub fn get_text<'call>( &'call self, params: &'call DocGetTextBoundParams, ) -> impl Future<Output = Result<DocGetTextResult>> + Send + 'call
Extract the plain-text content of the document.
Sourcepub async fn get_text_with_options(
&self,
params: &DocGetTextBoundParams,
options: InvokeOptions,
) -> Result<DocGetTextResult>
pub async fn get_text_with_options( &self, params: &DocGetTextBoundParams, options: InvokeOptions, ) -> Result<DocGetTextResult>
Extract the plain-text content of the document.
Sourcepub fn html_to_fragment<'call>(
&'call self,
params: &'call DocHtmlToFragmentBoundParams,
) -> impl Future<Output = Result<DocHtmlToFragmentResult>> + Send + 'call
pub fn html_to_fragment<'call>( &'call self, params: &'call DocHtmlToFragmentBoundParams, ) -> impl Future<Output = Result<DocHtmlToFragmentResult>> + Send + 'call
Convert an HTML string into an SDM/1 structural fragment.
Sourcepub async fn html_to_fragment_with_options(
&self,
params: &DocHtmlToFragmentBoundParams,
options: InvokeOptions,
) -> Result<DocHtmlToFragmentResult>
pub async fn html_to_fragment_with_options( &self, params: &DocHtmlToFragmentBoundParams, options: InvokeOptions, ) -> Result<DocHtmlToFragmentResult>
Convert an HTML string into an SDM/1 structural fragment.
Sourcepub fn info<'call>(
&'call self,
params: &'call DocInfoBoundParams,
) -> impl Future<Output = Result<DocInfoResult>> + Send + 'call
pub fn info<'call>( &'call self, params: &'call DocInfoBoundParams, ) -> impl Future<Output = Result<DocInfoResult>> + Send + 'call
Return document summary info including word, character, paragraph, heading, table, image, comment, tracked-change, SDT-field, list, and page counts, plus outline and capabilities.
Sourcepub async fn info_with_options(
&self,
params: &DocInfoBoundParams,
options: InvokeOptions,
) -> Result<DocInfoResult>
pub async fn info_with_options( &self, params: &DocInfoBoundParams, options: InvokeOptions, ) -> Result<DocInfoResult>
Return document summary info including word, character, paragraph, heading, table, image, comment, tracked-change, SDT-field, list, and page counts, plus outline and capabilities.
Sourcepub fn insert<'call>(
&'call self,
params: &'call DocInsertBoundParams,
) -> impl Future<Output = Result<DocInsertResult>> + Send + 'call
pub fn insert<'call>( &'call self, params: &'call DocInsertBoundParams, ) -> impl Future<Output = Result<DocInsertResult>> + Send + 'call
Insert content into the document. Text, rich, structural, and native OOXML input shapes: text-based (value + type) inserts inline content at a SelectionTarget or ref position within an existing block; structural SDFragment (content) inserts one or more blocks as siblings relative to a BlockNodeAddress target. When target/ref is omitted, content appends at the end of the document. Text mode supports text (default), markdown, and html. Native type:ooxml accepts namespaces and dependency manifests, or capture accepts a portable selection.extractOoxml result. Native copies remap package and review identities and require direct mode. Rich markdown/html and structural modes use placement (before/after/insideStart/insideEnd) to position relative to a block target.
Sourcepub async fn insert_with_options(
&self,
params: &DocInsertBoundParams,
options: InvokeOptions,
) -> Result<DocInsertResult>
pub async fn insert_with_options( &self, params: &DocInsertBoundParams, options: InvokeOptions, ) -> Result<DocInsertResult>
Insert content into the document. Text, rich, structural, and native OOXML input shapes: text-based (value + type) inserts inline content at a SelectionTarget or ref position within an existing block; structural SDFragment (content) inserts one or more blocks as siblings relative to a BlockNodeAddress target. When target/ref is omitted, content appends at the end of the document. Text mode supports text (default), markdown, and html. Native type:ooxml accepts namespaces and dependency manifests, or capture accepts a portable selection.extractOoxml result. Native copies remap package and review identities and require direct mode. Rich markdown/html and structural modes use placement (before/after/insideStart/insideEnd) to position relative to a block target.
Sourcepub fn insert_line_break<'call>(
&'call self,
params: &'call DocInsertLineBreakBoundParams,
) -> impl Future<Output = Result<DocInsertLineBreakResult>> + Send + 'call
pub fn insert_line_break<'call>( &'call self, params: &'call DocInsertLineBreakBoundParams, ) -> impl Future<Output = Result<DocInsertLineBreakResult>> + Send + 'call
Insert a real Word line-break node at a collapsed text insertion point. Accepts the same target/ref shortcuts as insert, but only for point inserts.
Sourcepub async fn insert_line_break_with_options(
&self,
params: &DocInsertLineBreakBoundParams,
options: InvokeOptions,
) -> Result<DocInsertLineBreakResult>
pub async fn insert_line_break_with_options( &self, params: &DocInsertLineBreakBoundParams, options: InvokeOptions, ) -> Result<DocInsertLineBreakResult>
Insert a real Word line-break node at a collapsed text insertion point. Accepts the same target/ref shortcuts as insert, but only for point inserts.
Sourcepub fn insert_tab<'call>(
&'call self,
params: &'call DocInsertTabBoundParams,
) -> impl Future<Output = Result<DocInsertTabResult>> + Send + 'call
pub fn insert_tab<'call>( &'call self, params: &'call DocInsertTabBoundParams, ) -> impl Future<Output = Result<DocInsertTabResult>> + Send + 'call
Insert a real Word tab node at a collapsed text insertion point. Accepts the same target/ref shortcuts as insert, but only for point inserts.
Sourcepub async fn insert_tab_with_options(
&self,
params: &DocInsertTabBoundParams,
options: InvokeOptions,
) -> Result<DocInsertTabResult>
pub async fn insert_tab_with_options( &self, params: &DocInsertTabBoundParams, options: InvokeOptions, ) -> Result<DocInsertTabResult>
Insert a real Word tab node at a collapsed text insertion point. Accepts the same target/ref shortcuts as insert, but only for point inserts.
Sourcepub fn markdown_to_fragment<'call>(
&'call self,
params: &'call DocMarkdownToFragmentBoundParams,
) -> impl Future<Output = Result<DocMarkdownToFragmentResult>> + Send + 'call
pub fn markdown_to_fragment<'call>( &'call self, params: &'call DocMarkdownToFragmentBoundParams, ) -> impl Future<Output = Result<DocMarkdownToFragmentResult>> + Send + 'call
Convert a Markdown string into an SDM/1 structural fragment.
Sourcepub async fn markdown_to_fragment_with_options(
&self,
params: &DocMarkdownToFragmentBoundParams,
options: InvokeOptions,
) -> Result<DocMarkdownToFragmentResult>
pub async fn markdown_to_fragment_with_options( &self, params: &DocMarkdownToFragmentBoundParams, options: InvokeOptions, ) -> Result<DocMarkdownToFragmentResult>
Convert a Markdown string into an SDM/1 structural fragment.
Sourcepub fn project_html<'call>(
&'call self,
params: &'call DocProjectHtmlBoundParams,
) -> impl Future<Output = Result<DocProjectHtmlResult>> + Send + 'call
pub fn project_html<'call>( &'call self, params: &'call DocProjectHtmlBoundParams, ) -> impl Future<Output = Result<DocProjectHtmlResult>> + Send + 'call
Project document content as HTML with review, scope, diagnostics, and provenance metadata.
Sourcepub async fn project_html_with_options(
&self,
params: &DocProjectHtmlBoundParams,
options: InvokeOptions,
) -> Result<DocProjectHtmlResult>
pub async fn project_html_with_options( &self, params: &DocProjectHtmlBoundParams, options: InvokeOptions, ) -> Result<DocProjectHtmlResult>
Project document content as HTML with review, scope, diagnostics, and provenance metadata.
Sourcepub fn project_markdown<'call>(
&'call self,
params: &'call DocProjectMarkdownBoundParams,
) -> impl Future<Output = Result<DocProjectMarkdownResult>> + Send + 'call
pub fn project_markdown<'call>( &'call self, params: &'call DocProjectMarkdownBoundParams, ) -> impl Future<Output = Result<DocProjectMarkdownResult>> + Send + 'call
Project document content as Markdown with review, scope, diagnostics, and provenance metadata.
Sourcepub async fn project_markdown_with_options(
&self,
params: &DocProjectMarkdownBoundParams,
options: InvokeOptions,
) -> Result<DocProjectMarkdownResult>
pub async fn project_markdown_with_options( &self, params: &DocProjectMarkdownBoundParams, options: InvokeOptions, ) -> Result<DocProjectMarkdownResult>
Project document content as Markdown with review, scope, diagnostics, and provenance metadata.
Sourcepub fn replace<'call>(
&'call self,
params: &'call DocReplaceBoundParams,
) -> impl Future<Output = Result<DocReplaceResult>> + Send + 'call
pub fn replace<'call>( &'call self, params: &'call DocReplaceBoundParams, ) -> impl Future<Output = Result<DocReplaceResult>> + Send + 'call
Optional replaceMode:contents retains one paragraph, heading, or listItem container while applying text, HTML, Markdown, SDFragment, or native OOXML inlines. A retained snapshotId source restores exact same-session original markup with an expectedSnapshotId local precondition. These writes require direct mode; existing selection and structural behavior is unchanged. Replace content at a contiguous document selection. Text path accepts a SelectionTarget or ref plus replacement text. For explicit single-paragraph text selections, expectedText rejects mismatches with PRECONDITION_FAILED before mutation. Tracked text replacements accept replacementGranularity: word (default), phrase (join neighboring edits separated only by spaces), or range (replace the complete selection). This requires an explicit single-paragraph text selection. Rich string path accepts HTML or Markdown plus a BlockNodeAddress, SelectionTarget, or ref. Structural path accepts the same locator forms plus SDFragment content. A single-paragraph rich replacement may overlap pending insertions: tracked mode drops the covered part of your own insertion, nests a deletion inside another author’s insertion, and adds the content as a new insertion; direct mode removes the covered part and leaves the rest pending. A tracked rich replacement spanning paragraphs that crosses a pending insertion, or a range that mixes pending insertions with comment, bookmark, field, or content-control markup, rejects without changes; capabilities.check reports the same result. An explicit {kind:‘story’, storyType:‘body’} target replaces the complete main body in direct mode while preserving the destination DOCX package.
Sourcepub async fn replace_with_options(
&self,
params: &DocReplaceBoundParams,
options: InvokeOptions,
) -> Result<DocReplaceResult>
pub async fn replace_with_options( &self, params: &DocReplaceBoundParams, options: InvokeOptions, ) -> Result<DocReplaceResult>
Optional replaceMode:contents retains one paragraph, heading, or listItem container while applying text, HTML, Markdown, SDFragment, or native OOXML inlines. A retained snapshotId source restores exact same-session original markup with an expectedSnapshotId local precondition. These writes require direct mode; existing selection and structural behavior is unchanged. Replace content at a contiguous document selection. Text path accepts a SelectionTarget or ref plus replacement text. For explicit single-paragraph text selections, expectedText rejects mismatches with PRECONDITION_FAILED before mutation. Tracked text replacements accept replacementGranularity: word (default), phrase (join neighboring edits separated only by spaces), or range (replace the complete selection). This requires an explicit single-paragraph text selection. Rich string path accepts HTML or Markdown plus a BlockNodeAddress, SelectionTarget, or ref. Structural path accepts the same locator forms plus SDFragment content. A single-paragraph rich replacement may overlap pending insertions: tracked mode drops the covered part of your own insertion, nests a deletion inside another author’s insertion, and adds the content as a new insertion; direct mode removes the covered part and leaves the rest pending. A tracked rich replacement spanning paragraphs that crosses a pending insertion, or a range that mixes pending insertions with comment, bookmark, field, or content-control markup, rejects without changes; capabilities.check reports the same result. An explicit {kind:‘story’, storyType:‘body’} target replaces the complete main body in direct mode while preserving the destination DOCX package.
Sourcepub fn save<'call>(
&'call self,
params: &'call DocSaveBoundParams,
) -> impl Future<Output = Result<DocSaveResult>> + Send + 'call
pub fn save<'call>( &'call self, params: &'call DocSaveBoundParams, ) -> impl Future<Output = Result<DocSaveResult>> + Send + 'call
Save the current session to the original file or a new path. Supports explicit review-preserving, final, and original export modes.
Sourcepub async fn save_with_options(
&self,
params: &DocSaveBoundParams,
options: InvokeOptions,
) -> Result<DocSaveResult>
pub async fn save_with_options( &self, params: &DocSaveBoundParams, options: InvokeOptions, ) -> Result<DocSaveResult>
Save the current session to the original file or a new path. Supports explicit review-preserving, final, and original export modes.