pub struct DeviceInfo {
pub model: String,
pub system_name: String,
pub system_version: String,
pub is_simulator: bool,
}Expand description
A snapshot of the device’s identity. Every field is best-effort — each OS reports a different
slice of the truth, and unknown fields fall back to "Unknown" (see the per-platform notes in
docs/deviceinfo.md).
Fields§
§model: StringThe hardware model identifier — e.g. "MacBookPro18,3" (macOS hw.model), "iPhone"
(iOS UIDevice.model reports the marketing class), "Pixel 7" (Android Build.MODEL), or
the DMI product_name on Linux. "Unknown" when unreadable.
system_name: StringThe operating-system family name — "macOS", "iOS" / "iPadOS", "Windows", the Linux
distro NAME, "OpenHarmony" / "HarmonyOS", or "Android".
system_version: StringThe OS version string — a dotted major.minor[.patch] on Apple/Windows, VERSION_ID on
Linux, Build.VERSION.RELEASE on Android, or the native display version on HarmonyOS.
"Unknown" when unreadable.
is_simulator: boolWhether the process is running on a simulator (iOS) or emulator (Android). Always false
on desktop platforms, which have no such notion.
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§fn clone(&self) -> DeviceInfo
fn clone(&self) -> DeviceInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more