pub enum DeviceKind {
Simulator,
Emulator,
PhysicalIos,
PhysicalAndroid,
}Expand description
What kind of device a registry entry names.
The distinction exists for one reason: what smix is allowed to do to it. A simulator can be erased and rebuilt in a minute; a phone in somebody’s pocket cannot. §9#1 hangs the destructive-action guard off this field.
Defaults to Simulator when the field is absent, and that direction
is deliberate. Every registry written before this field existed was
written by a simulator; reading those as physical would lock a working
setup behind an opt-in nobody asked for. Guessing “simulator” costs at
most one missing gate on a device that never needed it — guessing
“physical” breaks people who did nothing wrong.
Variants§
Simulator
iOS Simulator.
Emulator
Android emulator.
PhysicalIos
A physical iPhone or iPad.
PhysicalAndroid
A physical Android device.
Implementations§
Source§impl DeviceKind
impl DeviceKind
Sourcepub fn is_physical(self) -> bool
pub fn is_physical(self) -> bool
Is this a device somebody might be carrying around?
Trait Implementations§
Source§impl Clone for DeviceKind
impl Clone for DeviceKind
Source§fn clone(&self) -> DeviceKind
fn clone(&self) -> DeviceKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more