pub enum Platform {
MacOs,
Windows,
Linux,
Ios,
Android,
Web,
}Expand description
The platform ROSACE is running on.
Deliberately flat (no separate “Desktop” catch-all alongside MacOs/
Windows/Linux) — the AppBar proof (Phase 23 Step 3) needs to tell
macOS apart from other desktop OSes (traffic-light inset), so folding
them into one variant would immediately need un-folding.
Variants§
Implementations§
Source§impl Platform
impl Platform
Sourcepub fn detect() -> Self
pub fn detect() -> Self
Detects the platform at compile time — cfg(target_arch = "wasm32")
for web (sufficient on its own: nothing else compiles to wasm32 in
this codebase, so no runtime navigator.platform query is needed),
cfg(target_os) for every native target.
pub fn is_desktop(&self) -> bool
pub fn is_mobile(&self) -> bool
Trait Implementations§
impl Copy for Platform
impl Eq for Platform
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