Skip to main content

DocApiStyles

Struct DocApiStyles 

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

Implementations§

Source§

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

Source

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

Source

pub fn paragraph(&self) -> DocApiStylesParagraph<'a, I>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

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