pub struct PlatformProfile {
pub os: Os,
pub os_version: String,
pub platform_string: String,
pub max_touch_points: u8,
pub keyboard_layout: String,
}Expand description
Platform configuration.
§Example
use stygian_browser::profile::PlatformProfile;
let p = PlatformProfile::windows();
assert_eq!(p.max_touch_points, 0);Fields§
§os: OsOperating system.
os_version: StringHuman-readable OS version string (e.g. "10.0.0").
platform_string: Stringnavigator.platform value.
max_touch_points: u8navigator.maxTouchPoints — 0 for desktop, ≥5 for mobile.
keyboard_layout: StringKeyboard layout (e.g. "en-US").
Implementations§
Trait Implementations§
Source§impl Clone for PlatformProfile
impl Clone for PlatformProfile
Source§fn clone(&self) -> PlatformProfile
fn clone(&self) -> PlatformProfile
Returns a duplicate 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 PlatformProfile
impl Debug for PlatformProfile
Source§impl<'de> Deserialize<'de> for PlatformProfile
impl<'de> Deserialize<'de> for PlatformProfile
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
Auto Trait Implementations§
impl Freeze for PlatformProfile
impl RefUnwindSafe for PlatformProfile
impl Send for PlatformProfile
impl Sync for PlatformProfile
impl Unpin for PlatformProfile
impl UnsafeUnpin for PlatformProfile
impl UnwindSafe for PlatformProfile
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