pub enum LayoutSize {
Compact,
Medium,
Expanded,
Large,
}Expand description
A layout size of Adaptive.
Variants§
Implementations§
Source§impl LayoutSize
impl LayoutSize
Sourcepub const ALL: [LayoutSize; 4]
pub const ALL: [LayoutSize; 4]
Every size, narrowest first.
Sourcepub const REQUIRED: [LayoutSize; 2]
pub const REQUIRED: [LayoutSize; 2]
Sizes every Adaptive gives a layout of its own, and feature
contracts are checked in; the others borrow one.
pub fn name(self) -> &'static str
Sourcepub fn shown(self, declared: &[LayoutSize]) -> Option<LayoutSize>
pub fn shown(self, declared: &[LayoutSize]) -> Option<LayoutSize>
The size whose layout this one shows when it has none of its own: the next larger declared size, else the next smaller.
pub fn parse(name: &str) -> Option<Self>
Trait Implementations§
Source§impl Clone for LayoutSize
impl Clone for LayoutSize
impl Copy for LayoutSize
Source§impl Debug for LayoutSize
impl Debug for LayoutSize
Source§impl<'de> Deserialize<'de> for LayoutSize
impl<'de> Deserialize<'de> for LayoutSize
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LayoutSize
Source§impl Hash for LayoutSize
impl Hash for LayoutSize
Source§impl Ord for LayoutSize
impl Ord for LayoutSize
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 LayoutSize
impl PartialEq for LayoutSize
Source§impl PartialOrd for LayoutSize
impl PartialOrd for LayoutSize
Source§impl Serialize for LayoutSize
impl Serialize for LayoutSize
impl StructuralPartialEq for LayoutSize
Auto Trait Implementations§
impl Freeze for LayoutSize
impl RefUnwindSafe for LayoutSize
impl Send for LayoutSize
impl Sync for LayoutSize
impl Unpin for LayoutSize
impl UnsafeUnpin for LayoutSize
impl UnwindSafe for LayoutSize
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