Struct docx_rs::RunProperty

source ·
pub struct RunProperty {
Show 20 fields pub style: Option<RunStyle>, pub sz: Option<Sz>, pub sz_cs: Option<SzCs>, pub color: Option<Color>, pub highlight: Option<Highlight>, pub vert_align: Option<VertAlign>, pub underline: Option<Underline>, pub bold: Option<Bold>, pub bold_cs: Option<BoldCs>, pub caps: Option<Caps>, pub italic: Option<Italic>, pub italic_cs: Option<ItalicCs>, pub vanish: Option<Vanish>, pub spec_vanish: Option<SpecVanish>, pub character_spacing: Option<CharacterSpacing>, pub fonts: Option<RunFonts>, pub text_border: Option<TextBorder>, pub del: Option<Delete>, pub ins: Option<Insert>, pub strike: Option<Strike>,
}

Fields§

§style: Option<RunStyle>§sz: Option<Sz>§sz_cs: Option<SzCs>§color: Option<Color>§highlight: Option<Highlight>§vert_align: Option<VertAlign>§underline: Option<Underline>§bold: Option<Bold>§bold_cs: Option<BoldCs>§caps: Option<Caps>§italic: Option<Italic>§italic_cs: Option<ItalicCs>§vanish: Option<Vanish>§spec_vanish: Option<SpecVanish>§character_spacing: Option<CharacterSpacing>§fonts: Option<RunFonts>§text_border: Option<TextBorder>§del: Option<Delete>§ins: Option<Insert>§strike: Option<Strike>

Implementations§

source§

impl RunProperty

source

pub fn new() -> RunProperty

source

pub fn style(self, style_id: &str) -> Self

source

pub fn size(self, size: usize) -> RunProperty

source

pub fn spacing(self, spacing: i32) -> RunProperty

source

pub fn color(self, color: impl Into<String>) -> RunProperty

source

pub fn highlight(self, color: impl Into<String>) -> RunProperty

source

pub fn vert_align(self, a: VertAlignType) -> Self

source

pub fn bold(self) -> RunProperty

source

pub fn disable_bold(self) -> RunProperty

source

pub fn caps(self) -> RunProperty

source

pub fn italic(self) -> RunProperty

source

pub fn strike(self) -> RunProperty

source

pub fn disable_italic(self) -> RunProperty

source

pub fn underline(self, line_type: impl Into<String>) -> RunProperty

source

pub fn vanish(self) -> RunProperty

source

pub fn spec_vanish(self) -> RunProperty

source

pub fn fonts(self, font: RunFonts) -> RunProperty

source

pub fn text_border(self, b: TextBorder) -> Self

source

pub fn delete(self, d: Delete) -> Self

source

pub fn insert(self, i: Insert) -> Self

Trait Implementations§

source§

impl Clone for RunProperty

source§

fn clone(&self) -> RunProperty

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RunProperty

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RunProperty

source§

fn default() -> RunProperty

Returns the “default value” for a type. Read more
source§

impl ElementReader for RunProperty

source§

fn read<R: Read>( r: &mut EventReader<R>, _attrs: &[OwnedAttribute] ) -> Result<Self, ReaderError>

source§

impl PartialEq for RunProperty

source§

fn eq(&self, other: &RunProperty) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RunProperty

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for RunProperty

Auto Trait Implementations§

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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.