pub enum Space {
XS,
S,
M,
L,
XL,
}Expand description
A semantic spacing step, accepted wherever a container or modifier takes a gap or an inset
in points: column(..).spacing(Space::S), .padding(Space::M); an Insets constructor
takes Space::L.points().
Fonts are semantic (Font::Headline) and the house rule forbids point sizes; spacing is the
same kind of thing. A step resolves to a point value per platform, so the platforms have room
to differ and an app has one vocabulary. Today every platform resolves the same scale: 4, 8,
12, 16 and 24 points. A raw f64 stays accepted everywhere a Space is.
Variants§
XS
The tightest gap: between an icon and its label, between a caption and its value.
S
The default gap between siblings in a row or a short column.
M
The gap between groups within a page section.
L
A page’s edge inset, and the gap between sections.
XL
The gap between major regions of a page.
Implementations§
Trait Implementations§
impl Copy for Space
impl Eq for Space
Source§impl IntoInsets for Space
impl IntoInsets for Space
fn into_insets(self) -> Insets
impl StructuralPartialEq for Space
Auto Trait Implementations§
impl Freeze for Space
impl RefUnwindSafe for Space
impl Send for Space
impl Sync for Space
impl Unpin for Space
impl UnsafeUnpin for Space
impl UnwindSafe for Space
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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