Skip to main content

DocApiBlocks

Struct DocApiBlocks 

Source
pub struct DocApiBlocks<'a, I: Invoker> { /* private fields */ }

Implementations§

Source§

impl<'a, I: Invoker> DocApiBlocks<'a, I>

Source

pub fn new(invoker: &'a I) -> Self

Source

pub fn delete<'call>( &'call self, params: &'call DocBlocksDeleteBoundParams, ) -> impl Future<Output = Result<DocBlocksDeleteResult>> + Send + 'call

Delete an entire block node (paragraph, heading, list item, table, image, or sdt) deterministically.

Source

pub async fn delete_with_options( &self, params: &DocBlocksDeleteBoundParams, options: InvokeOptions, ) -> Result<DocBlocksDeleteResult>

Delete an entire block node (paragraph, heading, list item, table, image, or sdt) deterministically.

Source

pub fn delete_range<'call>( &'call self, params: &'call DocBlocksDeleteRangeBoundParams, ) -> impl Future<Output = Result<DocBlocksDeleteRangeResult>> + Send + 'call

Delete a contiguous range of top-level blocks between two endpoints (inclusive). Both endpoints must be direct children of the document node. Supports dry-run preview.

Source

pub async fn delete_range_with_options( &self, params: &DocBlocksDeleteRangeBoundParams, options: InvokeOptions, ) -> Result<DocBlocksDeleteRangeResult>

Delete a contiguous range of top-level blocks between two endpoints (inclusive). Both endpoints must be direct children of the document node. Supports dry-run preview.

Source

pub fn find_text<'call>( &'call self, params: &'call DocBlocksFindTextBoundParams, ) -> impl Future<Output = Result<DocBlocksFindTextResult>> + Send + 'call

Find top-level body blocks containing a literal case-insensitive substring. Matches flattened block text, coalescing repeated hits and nested table paragraphs into one block. Scans at most 20,000 blocks inside the document host and returns compact previews without transferring full-text pages.

Source

pub async fn find_text_with_options( &self, params: &DocBlocksFindTextBoundParams, options: InvokeOptions, ) -> Result<DocBlocksFindTextResult>

Find top-level body blocks containing a literal case-insensitive substring. Matches flattened block text, coalescing repeated hits and nested table paragraphs into one block. Scans at most 20,000 blocks inside the document host and returns compact previews without transferring full-text pages.

Source

pub fn list<'call>( &'call self, params: &'call DocBlocksListBoundParams, ) -> impl Future<Output = Result<DocBlocksListResult>> + Send + 'call

List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit after optional nodeTypes, nodeIds, and literal textSearch filtering, single-story scoping via in: <StoryLocator>, and final/original/redline projection of numbering metadata without changing block membership.

Source

pub async fn list_with_options( &self, params: &DocBlocksListBoundParams, options: InvokeOptions, ) -> Result<DocBlocksListResult>

List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit after optional nodeTypes, nodeIds, and literal textSearch filtering, single-story scoping via in: <StoryLocator>, and final/original/redline projection of numbering metadata without changing block membership.

Source

pub fn merge<'call>( &'call self, params: &'call DocBlocksMergeBoundParams, ) -> impl Future<Output = Result<DocBlocksMergeResult>> + Send + 'call

Merge two adjacent paragraphs in the same story. The first paragraph keeps its pPr; the second paragraph is removed. Rejects when either paragraph carries a w:sectPr or when their numbering definitions differ.

Source

pub async fn merge_with_options( &self, params: &DocBlocksMergeBoundParams, options: InvokeOptions, ) -> Result<DocBlocksMergeResult>

Merge two adjacent paragraphs in the same story. The first paragraph keeps its pPr; the second paragraph is removed. Rejects when either paragraph carries a w:sectPr or when their numbering definitions differ.

Source

pub fn move_<'call>( &'call self, params: &'call DocBlocksMoveBoundParams, ) -> impl Future<Output = Result<DocBlocksMoveResult>> + Send + 'call

Move a paragraph within the same story to a new anchor paragraph (before or after). Cross-story and relationship-bearing moves reject with named reasons. Tracked-mode authoring emits paired <w:moveFrom> / <w:moveTo> review state with explicit move range marker identity; safe content (no comment/bookmark/permission anchors and no pre-existing tracked wrappers) is required for tracked authoring.

Source

pub async fn move_with_options( &self, params: &DocBlocksMoveBoundParams, options: InvokeOptions, ) -> Result<DocBlocksMoveResult>

Move a paragraph within the same story to a new anchor paragraph (before or after). Cross-story and relationship-bearing moves reject with named reasons. Tracked-mode authoring emits paired <w:moveFrom> / <w:moveTo> review state with explicit move range marker identity; safe content (no comment/bookmark/permission anchors and no pre-existing tracked wrappers) is required for tracked authoring.

Source

pub fn split<'call>( &'call self, params: &'call DocBlocksSplitBoundParams, ) -> impl Future<Output = Result<DocBlocksSplitResult>> + Send + 'call

Split a paragraph at a visible-text offset, producing two paragraphs. Preserves unambiguous simple run properties around the cut. Rejects when the paragraph contains fields, content controls, drawings, equations, or unsupported tracked-change wrappers.

Source

pub async fn split_with_options( &self, params: &DocBlocksSplitBoundParams, options: InvokeOptions, ) -> Result<DocBlocksSplitResult>

Split a paragraph at a visible-text offset, producing two paragraphs. Preserves unambiguous simple run properties around the cut. Rejects when the paragraph contains fields, content controls, drawings, equations, or unsupported tracked-change wrappers.

Auto Trait Implementations§

§

impl<'a, I> Freeze for DocApiBlocks<'a, I>
where &'a I: Freeze,

§

impl<'a, I> RefUnwindSafe for DocApiBlocks<'a, I>

§

impl<'a, I> Send for DocApiBlocks<'a, I>
where &'a I: Send,

§

impl<'a, I> Sync for DocApiBlocks<'a, I>
where &'a I: Sync,

§

impl<'a, I> Unpin for DocApiBlocks<'a, I>
where &'a I: Unpin,

§

impl<'a, I> UnsafeUnpin for DocApiBlocks<'a, I>

§

impl<'a, I> UnwindSafe for DocApiBlocks<'a, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.