1use super::*;
2
3impl RenderArg {
5 #[must_use]
11 pub const fn to_render_mode(self) -> RenderMode {
12 match self {
13 Self::Auto => RenderMode::Auto,
14 Self::Software => RenderMode::Software,
15 Self::Hardware => RenderMode::Hardware,
16 Self::Hybrid => RenderMode::Hybrid,
17 }
18 }
19
20 #[must_use]
26 pub const fn as_flag(self) -> &'static str {
27 match self {
28 Self::Auto => RENDER_FLAG_AUTO,
29 Self::Software => RENDER_FLAG_SOFTWARE,
30 Self::Hardware => RENDER_FLAG_HARDWARE,
31 Self::Hybrid => RENDER_FLAG_HYBRID,
32 }
33 }
34}
35
36impl HarmonyFormFactorArg {
38 #[must_use]
44 pub const fn as_str(self) -> &'static str {
45 match self {
46 Self::Phone => HARMONY_FORM_PHONE,
47 Self::Tablet => HARMONY_FORM_TABLET,
48 Self::Pc => HARMONY_FORM_PC,
49 Self::Foldable => HARMONY_FORM_FOLDABLE,
50 Self::Tv => HARMONY_FORM_TV,
51 Self::Car => HARMONY_FORM_CAR,
52 Self::Wearable => HARMONY_FORM_WEARABLE,
53 }
54 }
55}