#[repr(u8)]pub enum MobileOs {
Android = 0,
Ios = 1,
HarmonyOs = 2,
}Expand description
移动端操作系统生态枚举(Android、iOS、鸿蒙 HarmonyOS NEXT / OpenHarmony)。
Variants§
Android = 0
Google Android(ANativeWindow / Choreographer / JNI / Vulkan)。
Ios = 1
Apple iOS / iPadOS(UIView / CADisplayLink / CAMetalLayer / Metal)。
HarmonyOs = 2
华为鸿蒙 HarmonyOS NEXT / OpenHarmony(OH_NativeXComponent / OHNativeWindow / ArkTS N-API / Vulkan)。
Implementations§
Source§impl MobileOs
impl MobileOs
Sourcepub const fn gpu_api_name(self) -> &'static str
pub const fn gpu_api_name(self) -> &'static str
获取当前移动操作系统对应的原生低开销硬件加速图形 API 名称。
Sourcepub const fn default_safe_area(
self,
orientation: DeviceOrientation,
) -> SafeAreaInsets
pub const fn default_safe_area( self, orientation: DeviceOrientation, ) -> SafeAreaInsets
获取当前移动操作系统在指定屏幕朝向下的标准安全区域预设。
Trait Implementations§
impl Copy for MobileOs
impl Eq for MobileOs
impl StructuralPartialEq for MobileOs
Auto Trait Implementations§
impl Forget for MobileOs
impl Freeze for MobileOs
impl Move for MobileOs
impl RefUnwindSafe for MobileOs
impl Send for MobileOs
impl Sync for MobileOs
impl Unpin for MobileOs
impl UnsafeUnpin for MobileOs
impl UnwindSafe for MobileOs
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。