pub enum HarmonyDeviceKind {
Phone,
Tablet,
Pc2In1,
Universal,
Foldable,
Wearable,
Tv,
Car,
}Expand description
HarmonyOS / OpenHarmony device form factor profiles supported by the Stage-Model builder.
Variants§
Phone
HarmonyOS smartphone profile (phone).
Tablet
HarmonyOS tablet profile (tablet).
Pc2In1
HarmonyOS 2-in-1 PC / desktop profile (2in1).
Universal
Universal multi-device profile (phone + tablet + 2in1).
Foldable
Foldable display profile (phone + tablet).
Wearable
HarmonyOS smartwatch wearable profile (wearable).
Tv
HarmonyOS smart TV / Vision profile (tv).
Car
HarmonyOS automotive / cockpit profile (car).
Implementations§
Source§impl HarmonyDeviceKind
Form factor metadata helpers for HarmonyDeviceKind.
impl HarmonyDeviceKind
Form factor metadata helpers for HarmonyDeviceKind.
Sourcepub fn as_label(&self) -> &'static str
pub fn as_label(&self) -> &'static str
Returns the canonical lowercase form factor label (phone, 2in1, wearable, etc.).
§Returns
&'static str- Canonical HarmonyOS device label.
Sourcepub fn rust_device_expr(&self) -> &'static str
pub fn rust_device_expr(&self) -> &'static str
Returns the Rust HarmonyDeviceType constant expression written to host_config.rs.
§Returns
&'static str- Rust enum expression.
Sourcepub fn is_pc_target(&self) -> bool
pub fn is_pc_target(&self) -> bool
Returns whether this device profile defaults to dual-ABI (arm64-v8a + x86_64) compilation.
§Returns
bool-trueforPc2In1andUniversal.
Sourcepub fn default_abis(&self) -> Vec<HarmonyAbi>
pub fn default_abis(&self) -> Vec<HarmonyAbi>
Returns the default HarmonyOS ABI list when none is explicitly configured.
§Returns
Vec<HarmonyAbi>- Default ABI selection for this form factor.
Sourcepub fn module_device_types_json(&self) -> &'static str
pub fn module_device_types_json(&self) -> &'static str
Returns the JSON array interior for module.json5 "deviceTypes".
§Returns
&'static str- Quoted JSON device type elements.
Sourcepub fn support_window_modes_json(&self) -> &'static str
pub fn support_window_modes_json(&self) -> &'static str
Returns the JSON array string for module.json5 "supportWindowMode".
§Returns
&'static str- JSON array literal of supported window modes.
Sourcepub fn window_limits_json(&self) -> &'static str
pub fn window_limits_json(&self) -> &'static str
Returns optional minWindowWidth / maxWindowHeight properties for module.json5.
§Returns
&'static str- Trailing JSON property snippet or empty string.
Trait Implementations§
Source§impl Clone for HarmonyDeviceKind
impl Clone for HarmonyDeviceKind
impl Copy for HarmonyDeviceKind
Source§impl Debug for HarmonyDeviceKind
impl Debug for HarmonyDeviceKind
Source§impl Default for HarmonyDeviceKind
impl Default for HarmonyDeviceKind
Source§impl<'de> Deserialize<'de> for HarmonyDeviceKind
impl<'de> Deserialize<'de> for HarmonyDeviceKind
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>,
impl Eq for HarmonyDeviceKind
Source§impl PartialEq for HarmonyDeviceKind
impl PartialEq for HarmonyDeviceKind
Source§impl Serialize for HarmonyDeviceKind
impl Serialize for HarmonyDeviceKind
impl StructuralPartialEq for HarmonyDeviceKind
Auto Trait Implementations§
impl Forget for HarmonyDeviceKind
impl Freeze for HarmonyDeviceKind
impl Move for HarmonyDeviceKind
impl RefUnwindSafe for HarmonyDeviceKind
impl Send for HarmonyDeviceKind
impl Sync for HarmonyDeviceKind
impl Unpin for HarmonyDeviceKind
impl UnsafeUnpin for HarmonyDeviceKind
impl UnwindSafe for HarmonyDeviceKind
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more