pub enum Platform {
Windows,
Android,
SteamDeck,
SteamLinux,
MacOS,
}Expand description
Target platform for AppShell rendering and token routing. P la tf or m enum.
Variants§
Windows
Android
SteamDeck
Steam Deck — 1280×800 touchscreen + gamepad primary, small tier.
SteamLinux
Steam Linux — GamepadUI fullscreen, desktop-class hardware, small tier.
MacOS
macOS — Apple HIG sidebar shell, SF Pro fonts, AppKit control sizing.
Implementations§
Source§impl Platform
impl Platform
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Returns the platform identifier string that matches Variants.* in Slint.
Sourcepub fn is_mobile(&self) -> bool
pub fn is_mobile(&self) -> bool
Returns true if the platform is a mobile target (portrait touch-first).
Sourcepub fn is_small(&self) -> bool
pub fn is_small(&self) -> bool
Returns true if the platform is the small tier (1280×800 touchscreen + gamepad).
Small tier: gamepad-safe 56px touch targets, bottom/rail nav, max 5 nav items.
Sourcepub fn is_desktop(&self) -> bool
pub fn is_desktop(&self) -> bool
Returns true if the platform is a desktop target (mouse+keyboard or gamepad fullscreen).
Desktop tier includes SteamLinux — fullscreen but with desktop nav limits.
Trait Implementations§
impl StructuralPartialEq for Platform
Auto Trait Implementations§
impl Freeze for Platform
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnsafeUnpin for Platform
impl UnwindSafe for Platform
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.