pub struct DocApiMetadata<'a, I: Invoker> { /* private fields */ }Implementations§
Source§impl<'a, I: Invoker> DocApiMetadata<'a, I>
impl<'a, I: Invoker> DocApiMetadata<'a, I>
pub fn new(invoker: &'a I) -> Self
Sourcepub fn attach<'call>(
&'call self,
params: &'call DocMetadataAttachBoundParams,
) -> impl Future<Output = Result<DocMetadataAttachResult>> + Send + 'call
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.
Sourcepub async fn attach_with_options(
&self,
params: &DocMetadataAttachBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataAttachResult>
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.
Sourcepub fn get<'call>(
&'call self,
params: &'call DocMetadataGetBoundParams,
) -> impl Future<Output = Result<DocMetadataGetResult>> + Send + 'call
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.
Sourcepub async fn get_with_options(
&self,
params: &DocMetadataGetBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataGetResult>
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.
Sourcepub fn list<'call>(
&'call self,
params: &'call DocMetadataListBoundParams,
) -> impl Future<Output = Result<DocMetadataListResult>> + Send + 'call
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).
Sourcepub async fn list_with_options(
&self,
params: &DocMetadataListBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataListResult>
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).
Sourcepub fn remove<'call>(
&'call self,
params: &'call DocMetadataRemoveBoundParams,
) -> impl Future<Output = Result<DocMetadataRemoveResult>> + Send + 'call
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.
Sourcepub async fn remove_with_options(
&self,
params: &DocMetadataRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataRemoveResult>
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.
Sourcepub fn resolve<'call>(
&'call self,
params: &'call DocMetadataResolveBoundParams,
) -> impl Future<Output = Result<DocMetadataResolveResult>> + Send + 'call
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.
Sourcepub async fn resolve_with_options(
&self,
params: &DocMetadataResolveBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataResolveResult>
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.
Sourcepub fn update<'call>(
&'call self,
params: &'call DocMetadataUpdateBoundParams,
) -> impl Future<Output = Result<DocMetadataUpdateResult>> + Send + 'call
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.
Sourcepub async fn update_with_options(
&self,
params: &DocMetadataUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataUpdateResult>
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.