pub struct HostChannelCapabilities { /* private fields */ }Expand description
Host-declared channel capability matrix unifying HarmonyOS, Wearables, MiniApps, and QuickApps.
Implementations§
Source§impl HostChannelCapabilities
Host-declared channel capability, single-channel non-probing, visual-equivalence gate, and simulated-profile honesty helpers.
impl HostChannelCapabilities
Host-declared channel capability, single-channel non-probing, visual-equivalence gate, and simulated-profile honesty helpers.
Sourcepub fn from_host_declaration(
host_name: &'static str,
supported_channels: Vec<HostRenderChannel>,
preferred_channel: HostRenderChannel,
visual_equivalence: HostVisualEquivalenceGate,
simulated_profile: bool,
direct_gpu_verified_on_device: bool,
) -> Self
pub fn from_host_declaration( host_name: &'static str, supported_channels: Vec<HostRenderChannel>, preferred_channel: HostRenderChannel, visual_equivalence: HostVisualEquivalenceGate, simulated_profile: bool, direct_gpu_verified_on_device: bool, ) -> Self
Constructs a validated HostChannelCapabilities enforcing single-channel non-probing and simulated-profile honesty.
Whenever simulated_profile is true, direct_gpu_verified_on_device is unconditionally forced to false.
§Arguments
&'static str- Lowercase host or vendor runtime name.Vec<HostRenderChannel>- Host-declared supported rendering channels.HostRenderChannel- Preferred rendering channel.HostVisualEquivalenceGate- Visual-equivalence invariant gate.bool- Whether this profile is simulated/off-device.bool- Whether direct GPU presentation was verified on a real physical device.
§Returns
Self- Validated capability descriptor.
Sourcepub fn is_single_channel(&self) -> bool
pub fn is_single_channel(&self) -> bool
Returns true when the host declares at most one rendering channel (strictly prohibiting alternate-mode probing).
§Returns
bool-truewhen locked to a single channel.
Sourcepub fn can_probe_alternate_channels(&self) -> bool
pub fn can_probe_alternate_channels(&self) -> bool
Returns true iff alternate rendering channels may be probed (supported_channels.len() > 1 and visually equivalent).
§Returns
bool-falsefor single-channel hosts or when visual equivalence fails.
Sourcepub fn probe_candidates(&self) -> Vec<HostRenderChannel>
pub fn probe_candidates(&self) -> Vec<HostRenderChannel>
Returns the ordered list of alternate channels eligible for probing (ALWAYS empty when supported_channels.len() <= 1).
§Returns
Vec<HostRenderChannel>- Empty for single-channel hosts or visual-equivalence failures.