pub struct ParagraphStyle {
pub alignment: Option<HorizontalAlignment>,
pub first_line_indent: Option<i32>,
pub left_indent: Option<i32>,
pub right_indent: Option<i32>,
pub space_before: Option<u32>,
pub space_after: Option<u32>,
pub line_spacing: Option<u32>,
}Expand description
段落级格式化。
对应 Java: com.alibaba.excel.write.metadata.style.WriteCellStyle 中的段落属性
Fields§
§alignment: Option<HorizontalAlignment>Horizontal text alignment.
first_line_indent: Option<i32>First-line indent in twips.
left_indent: Option<i32>Left indent in twips.
right_indent: Option<i32>Right indent in twips.
space_before: Option<u32>Space before paragraph in twips.
space_after: Option<u32>Space after paragraph in twips.
line_spacing: Option<u32>Line spacing (e.g. 240 = single, 360 = 1.5, 480 = double).
Implementations§
Source§impl ParagraphStyle
impl ParagraphStyle
Sourcepub fn new() -> ParagraphStyle
pub fn new() -> ParagraphStyle
Creates a new paragraph style with default values.
Sourcepub fn alignment(self, alignment: HorizontalAlignment) -> ParagraphStyle
pub fn alignment(self, alignment: HorizontalAlignment) -> ParagraphStyle
Sets horizontal alignment.
Sourcepub fn first_line_indent(self, indent: i32) -> ParagraphStyle
pub fn first_line_indent(self, indent: i32) -> ParagraphStyle
Sets first-line indent.
Sourcepub fn space_after(self, space: u32) -> ParagraphStyle
pub fn space_after(self, space: u32) -> ParagraphStyle
Sets spacing after the paragraph.
Sourcepub fn line_spacing(self, spacing: u32) -> ParagraphStyle
pub fn line_spacing(self, spacing: u32) -> ParagraphStyle
Sets line spacing in twips (240 = single, 360 = 1.5, 480 = double).
Trait Implementations§
Source§impl Clone for ParagraphStyle
impl Clone for ParagraphStyle
Source§fn clone(&self) -> ParagraphStyle
fn clone(&self) -> ParagraphStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParagraphStyle
impl Debug for ParagraphStyle
Source§impl Default for ParagraphStyle
impl Default for ParagraphStyle
Source§fn default() -> ParagraphStyle
fn default() -> ParagraphStyle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParagraphStyle
impl RefUnwindSafe for ParagraphStyle
impl Send for ParagraphStyle
impl Sync for ParagraphStyle
impl Unpin for ParagraphStyle
impl UnsafeUnpin for ParagraphStyle
impl UnwindSafe for ParagraphStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more