Skip to main content

HostCapabilityProfile

Struct HostCapabilityProfile 

Source
pub struct HostCapabilityProfile { /* private fields */ }
Expand description

Complete capability and channel declaration for a target host platform.

Implementations§

Source§

impl HostCapabilityProfile

Platform capability synthesis and gate helpers for HostCapabilityProfile.

Source

pub fn from_platform( platform: PlatformKind, capabilities: PlatformCapabilities, ) -> Self

Builds a truthful HostCapabilityProfile from platform and capabilities.

§Arguments
  • PlatformKind - Target execution platform.
  • PlatformCapabilities - Reported hardware capabilities.
§Returns
  • Self - Host capability profile with visual-equivalence baseline.
Source

pub fn single_channel( platform: PlatformKind, candidate: RenderBackendCandidate, backend: GraphicsBackend, ) -> Self

Creates a single-channel host profile locked strictly to candidate with probing permanently disabled.

§Arguments
  • PlatformKind - Target platform.
  • RenderBackendCandidate - Sole supported channel.
  • GraphicsBackend - Graphics backend bound to that channel.
§Returns
  • Self - Single-channel locked profile.
Source

pub fn from_host_channel_capabilities( platform: PlatformKind, caps: &HostChannelCapabilities, ) -> Self

Converts host-declared HostChannelCapabilities (HarmonyOS, Wearables, MiniApps, QuickApps) into a unified HostCapabilityProfile enforcing single-channel locking and simulated-profile honesty.

§Arguments
  • PlatformKind - Target execution platform.
  • &HostChannelCapabilities - Host-declared channel capability matrix.
§Returns
  • Self - Unified capability profile ready for AdaptiveRenderRouter.
Source

pub fn is_single_channel(&self) -> bool

Returns true when this host exposes at most one eligible rendering channel and MUST NOT probe others.

§Arguments
  • &Self - Host profile reference.
§Returns
  • bool - true for single-channel hosts.
Source

pub fn candidate_passes_gate( &self, candidate: RenderBackendCandidate, ) -> Result<(), VisualEquivalenceFailure>

Evaluates whether candidate passes this host’s capability and visual-equivalence gate.

§Arguments
  • &Self - Host profile reference.
  • RenderBackendCandidate - Candidate to verify.
§Returns
  • Result<(), VisualEquivalenceFailure> - Ok(()) if eligible, or exact failure reason.
Source

pub fn best_available_candidate( &self, exclude: Option<RenderBackendCandidate>, ) -> RenderBackendCandidate

Returns the first eligible visually-equivalent candidate matching priority order (GpuDirect first, excluding exclude).

§Arguments
  • &Self - Host profile reference.
  • Option<RenderBackendCandidate> - Optional candidate to skip (e.g., a failed startup or faulted backend).
§Returns
  • RenderBackendCandidate - Highest-priority eligible fallback candidate.
Source

pub fn graphics_backend_for( &self, candidate: RenderBackendCandidate, ) -> GraphicsBackend

Resolves the concrete GraphicsBackend declared for candidate on this host.

§Arguments
  • &Self - Host profile reference.
  • RenderBackendCandidate - Target candidate.
§Returns
  • GraphicsBackend - Declared graphics backend.
Source§

impl HostCapabilityProfile

Source

pub fn get_platform(&self) -> PlatformKind

Source

pub fn get_mut_platform(&mut self) -> &mut PlatformKind

Source

pub fn set_platform(&mut self, val: PlatformKind) -> &mut Self

Source

pub fn get_candidates(&self) -> &Vec<CandidateCapabilities>

Source

pub fn get_mut_candidates(&mut self) -> &mut Vec<CandidateCapabilities>

Source

pub fn set_candidates(&mut self, val: Vec<CandidateCapabilities>) -> &mut Self

Source

pub fn get_single_channel_only(&self) -> bool

Source

pub fn get_mut_single_channel_only(&mut self) -> &mut bool

Source

pub fn set_single_channel_only(&mut self, val: bool) -> &mut Self

Source

pub fn get_baseline_contract(&self) -> VisualEquivalenceContract

Source

pub fn get_mut_baseline_contract(&mut self) -> &mut VisualEquivalenceContract

Source

pub fn set_baseline_contract( &mut self, val: VisualEquivalenceContract, ) -> &mut Self

Trait Implementations§

Source§

impl Clone for HostCapabilityProfile

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostCapabilityProfile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HostCapabilityProfile

Default host capability profile for headless software execution.

Source§

fn default() -> Self

Creates a deterministic single-channel software host profile.

§Returns
  • Self - Default headless host profile.
Source§

impl Eq for HostCapabilityProfile

Source§

impl PartialEq for HostCapabilityProfile

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for HostCapabilityProfile

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.