Skip to main content

PlatformHostAdapter

Trait PlatformHostAdapter 

Source
pub trait PlatformHostAdapter:
    PlatformBackend
    + PlatformStorage
    + PlatformNavigation
    + PlatformLifecycleBridge {
    // Required methods
    fn device_form_factor(&self) -> DeviceFormFactor;
    fn host_vendor_name(&self) -> &'static str;
}
Expand description

Supertrait implemented by full cross-platform host adapters exposing uniform backend, storage, navigation, and lifecycle semantics.

Required Methods§

Source

fn device_form_factor(&self) -> DeviceFormFactor

Returns the concrete DeviceFormFactor of this running host instance.

§Arguments
  • &Self - Host adapter reference.
§Returns
  • DeviceFormFactor - Active physical or virtual form factor.
Source

fn host_vendor_name(&self) -> &'static str

Returns the canonical lowercase vendor or runtime name for diagnostics (never required by app UI code).

§Arguments
  • &Self - Host adapter reference.
§Returns
  • &'static str - Vendor or runtime identifier string.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl PlatformHostAdapter for HarmonyPlatform

PlatformHostAdapter implementation for HarmonyPlatform.

Source§

impl PlatformHostAdapter for MiniAppPlatform

PlatformHostAdapter implementation for MiniAppPlatform.

Source§

impl PlatformHostAdapter for QuickAppPlatform

PlatformHostAdapter implementation for QuickAppPlatform.

Source§

impl PlatformHostAdapter for TerminalPlatform

PlatformHostAdapter implementation for TerminalPlatform.

Source§

impl PlatformHostAdapter for WearablePlatform

PlatformHostAdapter implementation for WearablePlatform.