Struct ParagraphProperty

Source
pub struct ParagraphProperty {
Show 15 fields pub run_property: RunProperty, pub style: Option<ParagraphStyle>, pub numbering_property: Option<NumberingProperty>, pub alignment: Option<Justification>, pub indent: Option<Indent>, pub line_spacing: Option<LineSpacing>, pub keep_next: Option<bool>, pub keep_lines: Option<bool>, pub page_break_before: Option<bool>, pub widow_control: Option<bool>, pub outline_lvl: Option<OutlineLvl>, pub section_property: Option<SectionProperty>, pub tabs: Vec<Tab>, pub paragraph_property_change: Option<ParagraphPropertyChange>, pub borders: Option<ParagraphBorders>, /* private fields */
}

Fields§

§run_property: RunProperty§style: Option<ParagraphStyle>§numbering_property: Option<NumberingProperty>§alignment: Option<Justification>§indent: Option<Indent>§line_spacing: Option<LineSpacing>§keep_next: Option<bool>§keep_lines: Option<bool>§page_break_before: Option<bool>§widow_control: Option<bool>§outline_lvl: Option<OutlineLvl>§section_property: Option<SectionProperty>§tabs: Vec<Tab>§paragraph_property_change: Option<ParagraphPropertyChange>§borders: Option<ParagraphBorders>

Implementations§

Source§

impl ParagraphProperty

Source

pub fn new() -> ParagraphProperty

Source

pub fn align(self, alignment_type: AlignmentType) -> Self

Source

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

Source

pub fn indent( self, left: Option<i32>, special_indent: Option<SpecialIndentType>, end: Option<i32>, start_chars: Option<i32>, ) -> Self

Source

pub fn numbering(self, id: NumberingId, level: IndentLevel) -> Self

Source

pub fn numbering_property(self, np: NumberingProperty) -> Self

Source

pub fn line_spacing(self, spacing: LineSpacing) -> Self

Source

pub fn character_spacing(self, spacing: i32) -> Self

Source

pub fn keep_next(self, v: bool) -> Self

Source

pub fn keep_lines(self, v: bool) -> Self

Source

pub fn outline_lvl(self, v: usize) -> Self

Source

pub fn page_break_before(self, v: bool) -> Self

Source

pub fn widow_control(self, v: bool) -> Self

Source

pub fn add_tab(self, t: Tab) -> Self

Source

pub fn section_property(self, s: SectionProperty) -> Self

Source

pub fn paragraph_property_change(self, p: ParagraphPropertyChange) -> Self

Source

pub fn set_borders(self, borders: ParagraphBorders) -> Self

Source

pub fn set_border(self, border: ParagraphBorder) -> Self

Source

pub fn clear_border(self, position: ParagraphBorderPosition) -> Self

Source

pub fn clear_all_borders(self) -> Self

Trait Implementations§

Source§

impl Clone for ParagraphProperty

Source§

fn clone(&self) -> ParagraphProperty

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 ParagraphProperty

Source§

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

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

impl Default for ParagraphProperty

Source§

fn default() -> ParagraphProperty

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

impl ElementReader for ParagraphProperty

Source§

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

Source§

impl PartialEq for ParagraphProperty

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ParagraphProperty

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 ParagraphProperty

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

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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,

Source§

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>,

Source§

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>,

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.