Skip to main content

Cell

Struct Cell 

Source
pub struct Cell {
    pub text: TextBody,
    pub fill: Color,
    pub margin: (Option<Emu>, Option<Emu>, Option<Emu>, Option<Emu>),
    pub row_span: u32,
    pub grid_span: u32,
    pub h_merge: bool,
    pub v_merge: bool,
    pub anchor: VerticalAnchor,
    pub border_left: Option<CellBorder>,
    pub border_right: Option<CellBorder>,
    pub border_top: Option<CellBorder>,
    pub border_bottom: Option<CellBorder>,
}
Expand description

单元格。

Fields§

§text: TextBody

单元格文本体。

§fill: Color

单元格填充色。Color::None 表示不写出填充。

§margin: (Option<Emu>, Option<Emu>, Option<Emu>, Option<Emu>)

上下左右内边距(EMU)。

§row_span: u32

跨行数(rowSpan 属性,0 或 1 表示不跨行)。

§grid_span: u32

跨列数(gridSpan 属性,0 或 1 表示不跨列)。

§h_merge: bool

水平合并虚拟单元格标记(hMerge="1",被合并方写出)。

§v_merge: bool

垂直合并虚拟单元格标记(vMerge="1",被合并方写出)。

§anchor: VerticalAnchor

垂直对齐方式。

§border_left: Option<CellBorder>

左边框(<a:lnL>)。

§border_right: Option<CellBorder>

右边框(<a:lnR>)。

§border_top: Option<CellBorder>

上边框(<a:lnT>)。

§border_bottom: Option<CellBorder>

下边框(<a:lnB>)。

Trait Implementations§

Source§

impl Clone for Cell

Source§

fn clone(&self) -> Cell

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Cell

Source§

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

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

impl Default for Cell

Source§

fn default() -> Cell

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

Auto Trait Implementations§

§

impl Freeze for Cell

§

impl RefUnwindSafe for Cell

§

impl Send for Cell

§

impl Sync for Cell

§

impl Unpin for Cell

§

impl UnsafeUnpin for Cell

§

impl UnwindSafe for Cell

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, dest: *mut u8)

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