Skip to main content

ProgressBuilder

Struct ProgressBuilder 

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

进度条构建器(Doc::progress 的闭包参数)。

Implementations§

Source§

impl ProgressBuilder

Source

pub fn height(&mut self, h: f32) -> &mut Self

条高(逻辑像素,默认 10)。

Source

pub fn fill(&mut self, hex: &str) -> &mut Self

填充色(默认主题强调色)。

Source

pub fn track(&mut self, hex: &str) -> &mut Self

底槽色(默认主题边框色)。

Source

pub fn radius(&mut self, r: f32) -> &mut Self

圆角半径(逻辑像素,默认半高即胶囊形;0 = 直角)。

Source

pub fn width_px(&mut self, px: f32) -> &mut Self

条宽(绝对逻辑像素;默认铺满内容宽)。

Source

pub fn width_percent(&mut self, pct: f32) -> &mut Self

条宽(内容宽的百分比)。

Source

pub fn align(&mut self, a: Align) -> &mut Self

水平对齐(窄于内容宽时生效)。

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.