pub enum HarmonyDeviceType {
Phone,
Tablet,
Pc2In1,
Foldable,
Watch,
Tv,
Automotive,
}Expand description
All 7 HarmonyOS / OpenHarmony physical device categories unified by HarmonyPlatform.
Variants§
Phone
HarmonyOS smartphone (deviceType: "phone").
Tablet
HarmonyOS tablet (deviceType: "tablet").
Pc2In1
HarmonyOS PC / 2-in-1 desktop (deviceType: "2in1").
Foldable
HarmonyOS foldable phone/tablet with dynamic hinge transitions ("foldable").
Watch
HarmonyOS Watch / Wearable (deviceType: "wearable").
Tv
HarmonyOS Smart TV / Vision (deviceType: "tv").
Automotive
HarmonyOS Automotive / Smart Cockpit (deviceType: "car").
Implementations§
Source§impl HarmonyDeviceType
Canonical module.json5 metadata and form-factor mapping for HarmonyDeviceType.
impl HarmonyDeviceType
Canonical module.json5 metadata and form-factor mapping for HarmonyDeviceType.
Sourcepub const fn form_factor(&self) -> DeviceFormFactor
pub const fn form_factor(&self) -> DeviceFormFactor
Sourcepub const fn all_device_types() -> [HarmonyDeviceType; 7]
pub const fn all_device_types() -> [HarmonyDeviceType; 7]
Returns all 7 supported HarmonyOS / OpenHarmony device form factors.
§Returns
[Self; 7]- Array covering Phone, Tablet, PC/2-in-1, Foldable, Watch, TV, and Automotive.
Trait Implementations§
Source§impl Clone for HarmonyDeviceType
impl Clone for HarmonyDeviceType
Source§fn clone(&self) -> HarmonyDeviceType
fn clone(&self) -> HarmonyDeviceType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HarmonyDeviceType
Source§impl Debug for HarmonyDeviceType
impl Debug for HarmonyDeviceType
Source§impl Default for HarmonyDeviceType
impl Default for HarmonyDeviceType
Source§fn default() -> HarmonyDeviceType
fn default() -> HarmonyDeviceType
Returns the “default value” for a type. Read more
impl Eq for HarmonyDeviceType
Source§impl Hash for HarmonyDeviceType
impl Hash for HarmonyDeviceType
Source§impl Ord for HarmonyDeviceType
impl Ord for HarmonyDeviceType
Source§fn cmp(&self, other: &HarmonyDeviceType) -> Ordering
fn cmp(&self, other: &HarmonyDeviceType) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for HarmonyDeviceType
impl PartialEq for HarmonyDeviceType
Source§impl PartialOrd for HarmonyDeviceType
impl PartialOrd for HarmonyDeviceType
impl StructuralPartialEq for HarmonyDeviceType
Auto Trait Implementations§
impl Forget for HarmonyDeviceType
impl Freeze for HarmonyDeviceType
impl Move for HarmonyDeviceType
impl RefUnwindSafe for HarmonyDeviceType
impl Send for HarmonyDeviceType
impl Sync for HarmonyDeviceType
impl Unpin for HarmonyDeviceType
impl UnsafeUnpin for HarmonyDeviceType
impl UnwindSafe for HarmonyDeviceType
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