pub struct DocApiCreate<'a, I: Invoker> { /* private fields */ }Implementations§
Source§impl<'a, I: Invoker> DocApiCreate<'a, I>
impl<'a, I: Invoker> DocApiCreate<'a, I>
pub fn new(invoker: &'a I) -> Self
Sourcepub fn content_control<'call>(
&'call self,
params: &'call DocCreateContentControlBoundParams,
) -> impl Future<Output = Result<DocCreateContentControlResult>> + Send + 'call
pub fn content_control<'call>( &'call self, params: &'call DocCreateContentControlBoundParams, ) -> impl Future<Output = Result<DocCreateContentControlResult>> + Send + 'call
Create a new content control (SDT) in the document, optionally seeded with plain text or structured block preset content. Inline plain-text creation at a selection inherits the document run formatting at the caret or first selected character when inline is omitted; pending browser caret overrides are excluded. To include pending overrides, capture format.readSelection({ selection: “current” }) and pass its uniform values through inline. An explicit inline payload supplies fontFamily, fontSize, bold, italic, underline and strike values instead, with unspecified properties inheriting from the destination paragraph. It requires explicit content and commits formatting, content, tag and lockMode in one undoable operation. If inherited formatting cannot be resolved, creation returns CAPABILITY_UNAVAILABLE without changing the document or history; pass explicit inline values to bypass automatic inheritance.
Sourcepub async fn content_control_with_options(
&self,
params: &DocCreateContentControlBoundParams,
options: InvokeOptions,
) -> Result<DocCreateContentControlResult>
pub async fn content_control_with_options( &self, params: &DocCreateContentControlBoundParams, options: InvokeOptions, ) -> Result<DocCreateContentControlResult>
Create a new content control (SDT) in the document, optionally seeded with plain text or structured block preset content. Inline plain-text creation at a selection inherits the document run formatting at the caret or first selected character when inline is omitted; pending browser caret overrides are excluded. To include pending overrides, capture format.readSelection({ selection: “current” }) and pass its uniform values through inline. An explicit inline payload supplies fontFamily, fontSize, bold, italic, underline and strike values instead, with unspecified properties inheriting from the destination paragraph. It requires explicit content and commits formatting, content, tag and lockMode in one undoable operation. If inherited formatting cannot be resolved, creation returns CAPABILITY_UNAVAILABLE without changing the document or history; pass explicit inline values to bypass automatic inheritance.
Sourcepub fn heading<'call>(
&'call self,
params: &'call DocCreateHeadingBoundParams,
) -> impl Future<Output = Result<DocCreateHeadingResult>> + Send + 'call
pub fn heading<'call>( &'call self, params: &'call DocCreateHeadingBoundParams, ) -> impl Future<Output = Result<DocCreateHeadingResult>> + Send + 'call
Create a new heading at the target position.
Sourcepub async fn heading_with_options(
&self,
params: &DocCreateHeadingBoundParams,
options: InvokeOptions,
) -> Result<DocCreateHeadingResult>
pub async fn heading_with_options( &self, params: &DocCreateHeadingBoundParams, options: InvokeOptions, ) -> Result<DocCreateHeadingResult>
Create a new heading at the target position.
Sourcepub fn image<'call>(
&'call self,
params: &'call DocCreateImageBoundParams,
) -> impl Future<Output = Result<DocCreateImageResult>> + Send + 'call
pub fn image<'call>( &'call self, params: &'call DocCreateImageBoundParams, ) -> impl Future<Output = Result<DocCreateImageResult>> + Send + 'call
Insert a new image at the target position.
Sourcepub async fn image_with_options(
&self,
params: &DocCreateImageBoundParams,
options: InvokeOptions,
) -> Result<DocCreateImageResult>
pub async fn image_with_options( &self, params: &DocCreateImageBoundParams, options: InvokeOptions, ) -> Result<DocCreateImageResult>
Insert a new image at the target position.
Sourcepub fn paragraph<'call>(
&'call self,
params: &'call DocCreateParagraphBoundParams,
) -> impl Future<Output = Result<DocCreateParagraphResult>> + Send + 'call
pub fn paragraph<'call>( &'call self, params: &'call DocCreateParagraphBoundParams, ) -> impl Future<Output = Result<DocCreateParagraphResult>> + Send + 'call
Create a standalone paragraph at the target position. To add a list item, use lists.insert instead.
Sourcepub async fn paragraph_with_options(
&self,
params: &DocCreateParagraphBoundParams,
options: InvokeOptions,
) -> Result<DocCreateParagraphResult>
pub async fn paragraph_with_options( &self, params: &DocCreateParagraphBoundParams, options: InvokeOptions, ) -> Result<DocCreateParagraphResult>
Create a standalone paragraph at the target position. To add a list item, use lists.insert instead.
Sourcepub fn section_break<'call>(
&'call self,
params: &'call DocCreateSectionBreakBoundParams,
) -> impl Future<Output = Result<DocCreateSectionBreakResult>> + Send + 'call
pub fn section_break<'call>( &'call self, params: &'call DocCreateSectionBreakBoundParams, ) -> impl Future<Output = Result<DocCreateSectionBreakResult>> + Send + 'call
Create a section break at the target location with optional initial section properties.
Sourcepub async fn section_break_with_options(
&self,
params: &DocCreateSectionBreakBoundParams,
options: InvokeOptions,
) -> Result<DocCreateSectionBreakResult>
pub async fn section_break_with_options( &self, params: &DocCreateSectionBreakBoundParams, options: InvokeOptions, ) -> Result<DocCreateSectionBreakResult>
Create a section break at the target location with optional initial section properties.
Sourcepub fn table<'call>(
&'call self,
params: &'call DocCreateTableBoundParams,
) -> impl Future<Output = Result<DocCreateTableResult>> + Send + 'call
pub fn table<'call>( &'call self, params: &'call DocCreateTableBoundParams, ) -> impl Future<Output = Result<DocCreateTableResult>> + Send + 'call
Create a new table at the target position.
Sourcepub async fn table_with_options(
&self,
params: &DocCreateTableBoundParams,
options: InvokeOptions,
) -> Result<DocCreateTableResult>
pub async fn table_with_options( &self, params: &DocCreateTableBoundParams, options: InvokeOptions, ) -> Result<DocCreateTableResult>
Create a new table at the target position.
Sourcepub fn table_of_contents<'call>(
&'call self,
params: &'call DocCreateTableOfContentsBoundParams,
) -> impl Future<Output = Result<DocCreateTableOfContentsResult>> + Send + 'call
pub fn table_of_contents<'call>( &'call self, params: &'call DocCreateTableOfContentsBoundParams, ) -> impl Future<Output = Result<DocCreateTableOfContentsResult>> + Send + 'call
Insert a new table of contents at the target position.
Sourcepub async fn table_of_contents_with_options(
&self,
params: &DocCreateTableOfContentsBoundParams,
options: InvokeOptions,
) -> Result<DocCreateTableOfContentsResult>
pub async fn table_of_contents_with_options( &self, params: &DocCreateTableOfContentsBoundParams, options: InvokeOptions, ) -> Result<DocCreateTableOfContentsResult>
Insert a new table of contents at the target position.