pub enum OperatingSystem {
Unknown,
Android,
IOS,
Nix,
Mac,
Windows,
}
Expand description
An enum
of common operating systems.
Variants§
Unknown
Unknown OS - could be wasm
Android
Android OS
IOS
Apple iPhone OS
Nix
Linux or Unix other than Android
Mac
macOS
Windows
Windows
Implementations§
Source§impl OperatingSystem
impl OperatingSystem
Sourcepub const fn from_target_os() -> Self
pub const fn from_target_os() -> Self
Uses the compile-time target_arch
to identify the OS.
Sourcepub fn from_user_agent(user_agent: &str) -> Self
pub fn from_user_agent(user_agent: &str) -> Self
Helper: try to guess from the user-agent of a browser.
Trait Implementations§
Source§impl Clone for OperatingSystem
impl Clone for OperatingSystem
Source§fn clone(&self) -> OperatingSystem
fn clone(&self) -> OperatingSystem
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OperatingSystem
impl Debug for OperatingSystem
Source§impl Default for OperatingSystem
impl Default for OperatingSystem
Source§impl Hash for OperatingSystem
impl Hash for OperatingSystem
Source§impl PartialEq for OperatingSystem
impl PartialEq for OperatingSystem
impl Copy for OperatingSystem
impl Eq for OperatingSystem
impl StructuralPartialEq for OperatingSystem
Auto Trait Implementations§
impl Freeze for OperatingSystem
impl RefUnwindSafe for OperatingSystem
impl Send for OperatingSystem
impl Sync for OperatingSystem
impl Unpin for OperatingSystem
impl UnwindSafe for OperatingSystem
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