pub enum LengthToken {
Show 13 variants
RadiusNone,
RadiusInner,
RadiusElement,
RadiusContainer,
RadiusPage,
RadiusChat,
RadiusFull,
SizeElementSm,
SizeElementMd,
SizeElementLg,
BorderWidth,
FocusOutlineWidth,
FocusOutlineOffset,
}Expand description
长度类 token:圆角、控件尺寸、边框宽度、焦点环。单位统一解析为 px。
Variants§
RadiusNone
0px —— 不受半径倍率影响
RadiusInner
4px —— 容器内部的小元素
RadiusElement
8px —— 按钮 / 输入框 / 行
RadiusContainer
12px —— 卡片 / 浮层
RadiusPage
28px —— 页面级容器
RadiusChat
28px —— 气泡
RadiusFull
9999px —— 完全圆,不受半径倍率影响
SizeElementSm
28px —— 紧凑控件高度
SizeElementMd
32px —— 默认控件高度
SizeElementLg
36px —— 触控友好高度
BorderWidth
1px
FocusOutlineWidth
2px
FocusOutlineOffset
3px
Implementations§
Trait Implementations§
Source§impl Clone for LengthToken
impl Clone for LengthToken
impl Copy for LengthToken
Source§impl Debug for LengthToken
impl Debug for LengthToken
impl Eq for LengthToken
Source§impl Hash for LengthToken
impl Hash for LengthToken
Source§impl Ord for LengthToken
impl Ord for LengthToken
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for LengthToken
impl PartialEq for LengthToken
Source§impl PartialOrd for LengthToken
impl PartialOrd for LengthToken
impl StructuralPartialEq for LengthToken
Auto Trait Implementations§
impl Forget for LengthToken
impl Freeze for LengthToken
impl Move for LengthToken
impl RefUnwindSafe for LengthToken
impl Send for LengthToken
impl Sync for LengthToken
impl Unpin for LengthToken
impl UnsafeUnpin for LengthToken
impl UnwindSafe for LengthToken
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