Skip to main content

DocApiCreate

Struct DocApiCreate 

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

Implementations§

Source§

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

Source

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

Source

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.

Source

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.

Source

pub fn heading<'call>( &'call self, params: &'call DocCreateHeadingBoundParams, ) -> impl Future<Output = Result<DocCreateHeadingResult>> + Send + 'call

Create a new heading at the target position.

Source

pub async fn heading_with_options( &self, params: &DocCreateHeadingBoundParams, options: InvokeOptions, ) -> Result<DocCreateHeadingResult>

Create a new heading at the target position.

Source

pub fn image<'call>( &'call self, params: &'call DocCreateImageBoundParams, ) -> impl Future<Output = Result<DocCreateImageResult>> + Send + 'call

Insert a new image at the target position.

Source

pub async fn image_with_options( &self, params: &DocCreateImageBoundParams, options: InvokeOptions, ) -> Result<DocCreateImageResult>

Insert a new image at the target position.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn table<'call>( &'call self, params: &'call DocCreateTableBoundParams, ) -> impl Future<Output = Result<DocCreateTableResult>> + Send + 'call

Create a new table at the target position.

Source

pub async fn table_with_options( &self, params: &DocCreateTableBoundParams, options: InvokeOptions, ) -> Result<DocCreateTableResult>

Create a new table at the target position.

Source

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.

Source

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.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<'a, I> UnwindSafe for DocApiCreate<'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.