pub struct DocApiStyles<'a, I: Invoker> { /* private fields */ }Implementations§
Source§impl<'a, I: Invoker> DocApiStyles<'a, I>
impl<'a, I: Invoker> DocApiStyles<'a, I>
pub fn new(invoker: &'a I) -> Self
pub fn paragraph(&self) -> DocApiStylesParagraph<'a, I>
Sourcepub fn apply<'call>(
&'call self,
params: &'call DocStylesApplyBoundParams,
) -> impl Future<Output = Result<DocStylesApplyResult>> + Send + 'call
pub fn apply<'call>( &'call self, params: &'call DocStylesApplyBoundParams, ) -> impl Future<Output = Result<DocStylesApplyResult>> + Send + 'call
Apply style changes to the active Style Definitions part. Targets docDefaults run and paragraph channels, or the run properties of an existing named paragraph style (scope “style”), with set-style patch semantics. Redefining a named style updates every paragraph that references it; its linked character style receives the same patch, null removes a property so the style inherits it again, and an object value replaces that property whole.
Sourcepub async fn apply_with_options(
&self,
params: &DocStylesApplyBoundParams,
options: InvokeOptions,
) -> Result<DocStylesApplyResult>
pub async fn apply_with_options( &self, params: &DocStylesApplyBoundParams, options: InvokeOptions, ) -> Result<DocStylesApplyResult>
Apply style changes to the active Style Definitions part. Targets docDefaults run and paragraph channels, or the run properties of an existing named paragraph style (scope “style”), with set-style patch semantics. Redefining a named style updates every paragraph that references it; its linked character style receives the same patch, null removes a property so the style inherits it again, and an object value replaces that property whole.
Sourcepub fn create<'call>(
&'call self,
params: &'call DocStylesCreateBoundParams,
) -> impl Future<Output = Result<DocStylesCreateResult>> + Send + 'call
pub fn create<'call>( &'call self, params: &'call DocStylesCreateBoundParams, ) -> impl Future<Output = Result<DocStylesCreateResult>> + Send + 'call
Define or redefine a named paragraph or character style in the Style Definitions part. Replaces the definition rather than merging into it, and decides conflicts on both styleId and name, because Word keys its Styles gallery on the name. Linked style pairs and table/numbering styles are out of scope.
Sourcepub async fn create_with_options(
&self,
params: &DocStylesCreateBoundParams,
options: InvokeOptions,
) -> Result<DocStylesCreateResult>
pub async fn create_with_options( &self, params: &DocStylesCreateBoundParams, options: InvokeOptions, ) -> Result<DocStylesCreateResult>
Define or redefine a named paragraph or character style in the Style Definitions part. Replaces the definition rather than merging into it, and decides conflicts on both styleId and name, because Word keys its Styles gallery on the name. Linked style pairs and table/numbering styles are out of scope.
Sourcepub fn get_catalog<'call>(
&'call self,
params: &'call DocStylesGetCatalogBoundParams,
) -> impl Future<Output = Result<DocStylesGetCatalogResult>> + Send + 'call
pub fn get_catalog<'call>( &'call self, params: &'call DocStylesGetCatalogBoundParams, ) -> impl Future<Output = Result<DocStylesGetCatalogResult>> + Send + 'call
List the available styles as a normalized catalogue with stable IDs, display names, type, visibility, priority, provenance, and source diagnostics. Supports view (quickGallery/recommended/currentDocument/all/inUse), type filtering, hidden/latent inclusion, usage rollups, and UI-safe preview tokens. Distinct from DocumentInfo.styles, which is a usage summary.
Sourcepub async fn get_catalog_with_options(
&self,
params: &DocStylesGetCatalogBoundParams,
options: InvokeOptions,
) -> Result<DocStylesGetCatalogResult>
pub async fn get_catalog_with_options( &self, params: &DocStylesGetCatalogBoundParams, options: InvokeOptions, ) -> Result<DocStylesGetCatalogResult>
List the available styles as a normalized catalogue with stable IDs, display names, type, visibility, priority, provenance, and source diagnostics. Supports view (quickGallery/recommended/currentDocument/all/inUse), type filtering, hidden/latent inclusion, usage rollups, and UI-safe preview tokens. Distinct from DocumentInfo.styles, which is a usage summary.
Sourcepub fn get_theme<'call>(
&'call self,
params: &'call DocStylesGetThemeBoundParams,
) -> impl Future<Output = Result<DocStylesGetThemeResult>> + Send + 'call
pub fn get_theme<'call>( &'call self, params: &'call DocStylesGetThemeBoundParams, ) -> impl Future<Output = Result<DocStylesGetThemeResult>> + Send + 'call
Read the document theme: its 12 theme colors, major and minor fonts, and the color mapping from settings.xml. A missing or malformed theme part returns the default Office theme labeled source ‘fallback’, with part status and diagnostics. Same theme as doc.get().theme, without the rest of the document.
Sourcepub async fn get_theme_with_options(
&self,
params: &DocStylesGetThemeBoundParams,
options: InvokeOptions,
) -> Result<DocStylesGetThemeResult>
pub async fn get_theme_with_options( &self, params: &DocStylesGetThemeBoundParams, options: InvokeOptions, ) -> Result<DocStylesGetThemeResult>
Read the document theme: its 12 theme colors, major and minor fonts, and the color mapping from settings.xml. A missing or malformed theme part returns the default Office theme labeled source ‘fallback’, with part status and diagnostics. Same theme as doc.get().theme, without the rest of the document.