pub struct LayoutConfig {
pub compact_below: f64,
pub medium_below: Option<f64>,
pub expanded_below: Option<f64>,
}Expand description
Breakpoints choosing between layout sizes, from [layouts].
Fields§
§compact_below: f64Available width, in logical units, below which compact applies.
medium_below: Option<f64>Below which medium applies; without it there is no medium.
expanded_below: Option<f64>Below which expanded applies, and large from it; without it
there is no large.
Implementations§
Source§impl LayoutConfig
impl LayoutConfig
Sourcepub fn size(&self, width: f64) -> LayoutSize
pub fn size(&self, width: f64) -> LayoutSize
The size for an available width: every width maps to exactly one.
Sourcepub fn has(&self, size: LayoutSize) -> bool
pub fn has(&self, size: LayoutSize) -> bool
Whether the breakpoints give size a range of widths.
Trait Implementations§
Source§impl Clone for LayoutConfig
impl Clone for LayoutConfig
impl Copy for LayoutConfig
Source§impl Debug for LayoutConfig
impl Debug for LayoutConfig
Source§impl<'de> Deserialize<'de> for LayoutConfig
impl<'de> Deserialize<'de> for LayoutConfig
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
Source§impl PartialEq for LayoutConfig
impl PartialEq for LayoutConfig
Source§impl Serialize for LayoutConfig
impl Serialize for LayoutConfig
impl StructuralPartialEq for LayoutConfig
Auto Trait Implementations§
impl Freeze for LayoutConfig
impl RefUnwindSafe for LayoutConfig
impl Send for LayoutConfig
impl Sync for LayoutConfig
impl Unpin for LayoutConfig
impl UnsafeUnpin for LayoutConfig
impl UnwindSafe for LayoutConfig
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