Skip to main content

ColumnsBuilder

Struct ColumnsBuilder 

Source
pub struct ColumnsBuilder { /* private fields */ }
Expand description

并排栏构建器。

Implementations§

Source§

impl ColumnsBuilder

Source

pub fn gap(&mut self, g: f32) -> &mut Self

栏间距(逻辑像素;非有限或 < 0 忽略)。

Source

pub fn col<R>(&mut self, f: impl FnOnce(&mut Doc) -> R) -> &mut Self

一栏(权重 1.0)。

Source

pub fn col_weighted<R>( &mut self, weight: f32, f: impl FnOnce(&mut Doc) -> R, ) -> &mut Self

一栏(指定宽度权重;非有限或 ≤ 0 回退 1.0,与标记前端口径一致)。

Source

pub fn panel<R>(&mut self, f: impl FnOnce(&mut PanelBuilder) -> R) -> &mut Self

一栏卡片(权重 1.0):整栏就是一个面板,装饰盒自动拉齐到本行最高栏。

Source

pub fn panel_weighted<R>( &mut self, weight: f32, f: impl FnOnce(&mut PanelBuilder) -> R, ) -> &mut Self

一栏卡片(指定宽度权重;非法权重回退 1.0)。

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