Skip to main content

DocApiSelection

Struct DocApiSelection 

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

Implementations§

Source§

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

Source

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

Source

pub fn current<'call>( &'call self, params: &'call DocSelectionCurrentBoundParams, ) -> impl Future<Output = Result<DocSelectionCurrentResult>> + Send + 'call

Read the editor’s current selection as a portable SelectionInfo with text targets or V2 browser table/cell metadata. Primitive for building custom comments UIs, floating toolbars, and other selection-driven components without reaching into ProseMirror internals.

Source

pub async fn current_with_options( &self, params: &DocSelectionCurrentBoundParams, options: InvokeOptions, ) -> Result<DocSelectionCurrentResult>

Read the editor’s current selection as a portable SelectionInfo with text targets or V2 browser table/cell metadata. Primitive for building custom comments UIs, floating toolbars, and other selection-driven components without reaching into ProseMirror internals.

Source

pub fn extract_ooxml<'call>( &'call self, params: &'call DocSelectionExtractOoxmlBoundParams, ) -> impl Future<Output = Result<DocSelectionExtractOoxmlResult>> + Send + 'call

Capture a nonempty current or addressed selection as portable OOXML with native dependencies. Optional retain:true keeps an exact same-session restoration handle for one complete standalone body paragraph; release it when unused. Unsupported retained contexts and collaboration reject.

Source

pub async fn extract_ooxml_with_options( &self, params: &DocSelectionExtractOoxmlBoundParams, options: InvokeOptions, ) -> Result<DocSelectionExtractOoxmlResult>

Capture a nonempty current or addressed selection as portable OOXML with native dependencies. Optional retain:true keeps an exact same-session restoration handle for one complete standalone body paragraph; release it when unused. Unsupported retained contexts and collaboration reject.

Source

pub fn release_snapshot<'call>( &'call self, params: &'call DocSelectionReleaseSnapshotBoundParams, ) -> impl Future<Output = Result<DocSelectionReleaseSnapshotResult>> + Send + 'call

Release a retained exact-selection snapshot without changing document content or Undo history.

Source

pub async fn release_snapshot_with_options( &self, params: &DocSelectionReleaseSnapshotBoundParams, options: InvokeOptions, ) -> Result<DocSelectionReleaseSnapshotResult>

Release a retained exact-selection snapshot without changing document content or Undo history.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

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