pub struct SpacingTokens {
pub xs: f32,
pub sm: f32,
pub md: f32,
pub lg: f32,
pub xl: f32,
}Expand description
Spacing design tokens returned by Theme::spacing_tokens.
Provides semantic spacing values that widgets and layout engines use instead of magic numbers. The values are in logical pixels.
Fields§
§xs: f32Extra-small spacing (e.g. icon padding). Default: 4 px.
sm: f32Small spacing (e.g. button inner padding). Default: 8 px.
md: f32Medium spacing (e.g. form field gap). Default: 12 px.
lg: f32Large spacing (e.g. section gap). Default: 16 px.
xl: f32Extra-large spacing (e.g. page margin). Default: 24 px.
Trait Implementations§
Source§impl Clone for SpacingTokens
impl Clone for SpacingTokens
Source§fn clone(&self) -> SpacingTokens
fn clone(&self) -> SpacingTokens
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 moreimpl Copy for SpacingTokens
Source§impl Debug for SpacingTokens
impl Debug for SpacingTokens
Source§impl PartialEq for SpacingTokens
impl PartialEq for SpacingTokens
Source§fn eq(&self, other: &SpacingTokens) -> bool
fn eq(&self, other: &SpacingTokens) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SpacingTokens
Auto Trait Implementations§
impl Freeze for SpacingTokens
impl RefUnwindSafe for SpacingTokens
impl Send for SpacingTokens
impl Sync for SpacingTokens
impl Unpin for SpacingTokens
impl UnsafeUnpin for SpacingTokens
impl UnwindSafe for SpacingTokens
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more