#[repr(u16)]pub enum WindowSizeClass {
Compact = 0,
Medium = 1,
Expanded = 2,
}Variants§
Implementations§
Source§impl WindowSizeClass
impl WindowSizeClass
Sourcepub const MEDIUM_MIN_WIDTH_DP: f32 = 600.0
pub const MEDIUM_MIN_WIDTH_DP: f32 = 600.0
The width in dp at which Medium begins, and the width at which Expanded does.
These are the Material 3 window size class boundaries. Using different numbers would make the Compose components adapt at one width and the Rust layout branch at another, and that mismatch is visible on screen.
pub const EXPANDED_MIN_WIDTH_DP: f32 = 840.0
Sourcepub fn from_width_dp(width_dp: f32) -> Self
pub fn from_width_dp(width_dp: f32) -> Self
The class a window of this width belongs to. Height does not take part.
Trait Implementations§
Source§impl Clone for WindowSizeClass
impl Clone for WindowSizeClass
impl Copy for WindowSizeClass
Source§impl Debug for WindowSizeClass
impl Debug for WindowSizeClass
impl Eq for WindowSizeClass
Source§impl From<WindowSizeClass> for u16
impl From<WindowSizeClass> for u16
Source§fn from(value: WindowSizeClass) -> Self
fn from(value: WindowSizeClass) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WindowSizeClass
impl PartialEq for WindowSizeClass
impl StructuralPartialEq for WindowSizeClass
Auto Trait Implementations§
impl Freeze for WindowSizeClass
impl RefUnwindSafe for WindowSizeClass
impl Send for WindowSizeClass
impl Sync for WindowSizeClass
impl Unpin for WindowSizeClass
impl UnsafeUnpin for WindowSizeClass
impl UnwindSafe for WindowSizeClass
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