Skip to main content

DocApiMetadata

Struct DocApiMetadata 

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

Implementations§

Source§

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

Source

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

Source

pub fn attach<'call>( &'call self, params: &'call DocMetadataAttachBoundParams, ) -> impl Future<Output = Result<DocMetadataAttachResult>> + Send + 'call

Anchor a JSON metadata payload to a span of text. Wraps the target range in a hidden inline content control whose w:tag carries a stable id, and stores the payload in a namespaced Custom XML Data Storage Part. v1 supports text-range anchors only.

Source

pub async fn attach_with_options( &self, params: &DocMetadataAttachBoundParams, options: InvokeOptions, ) -> Result<DocMetadataAttachResult>

Anchor a JSON metadata payload to a span of text. Wraps the target range in a hidden inline content control whose w:tag carries a stable id, and stores the payload in a namespaced Custom XML Data Storage Part. v1 supports text-range anchors only.

Source

pub fn get<'call>( &'call self, params: &'call DocMetadataGetBoundParams, ) -> impl Future<Output = Result<DocMetadataGetResult>> + Send + 'call

Get a single anchored-metadata entry by id, including its JSON payload.

Source

pub async fn get_with_options( &self, params: &DocMetadataGetBoundParams, options: InvokeOptions, ) -> Result<DocMetadataGetResult>

Get a single anchored-metadata entry by id, including its JSON payload.

Source

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

List anchored-metadata entries in the document, optionally filtered by consumer namespace and/or a within selection (returns only entries whose anchor overlaps within).

Source

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

List anchored-metadata entries in the document, optionally filtered by consumer namespace and/or a within selection (returns only entries whose anchor overlaps within).

Source

pub fn remove<'call>( &'call self, params: &'call DocMetadataRemoveBoundParams, ) -> impl Future<Output = Result<DocMetadataRemoveResult>> + Send + 'call

Remove an anchored-metadata entry. Strips the anchor content-control wrapper (its content stays in the document) and deletes the payload entry from the Storage Part. In v1 these writes are sequenced, not transactional: the adapter resolves the target up-front so missing-target failures land before any state change, but a crash strictly between the two writes can leave a dangling payload. When the backing part has no remaining entries, the part itself is removed.

Source

pub async fn remove_with_options( &self, params: &DocMetadataRemoveBoundParams, options: InvokeOptions, ) -> Result<DocMetadataRemoveResult>

Remove an anchored-metadata entry. Strips the anchor content-control wrapper (its content stays in the document) and deletes the payload entry from the Storage Part. In v1 these writes are sequenced, not transactional: the adapter resolves the target up-front so missing-target failures land before any state change, but a crash strictly between the two writes can leave a dangling payload. When the backing part has no remaining entries, the part itself is removed.

Source

pub fn resolve<'call>( &'call self, params: &'call DocMetadataResolveBoundParams, ) -> impl Future<Output = Result<DocMetadataResolveResult>> + Send + 'call

Find where an anchored-metadata entry is anchored in the document. Returns the SelectionTarget covering the anchor content.

Source

pub async fn resolve_with_options( &self, params: &DocMetadataResolveBoundParams, options: InvokeOptions, ) -> Result<DocMetadataResolveResult>

Find where an anchored-metadata entry is anchored in the document. Returns the SelectionTarget covering the anchor content.

Source

pub fn update<'call>( &'call self, params: &'call DocMetadataUpdateBoundParams, ) -> impl Future<Output = Result<DocMetadataUpdateResult>> + Send + 'call

Replace the JSON payload of an existing anchored-metadata entry. Replace semantics; no merge. The anchor is left untouched.

Source

pub async fn update_with_options( &self, params: &DocMetadataUpdateBoundParams, options: InvokeOptions, ) -> Result<DocMetadataUpdateResult>

Replace the JSON payload of an existing anchored-metadata entry. Replace semantics; no merge. The anchor is left untouched.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

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