pub struct LoadedProfile {
pub profile: HnepProfile,
pub host: HardwareInfo,
pub exact_match: bool,
pub class_match: bool,
pub policy: MismatchPolicy,
pub force_baseline: bool,
pub status: String,
}Expand description
Outcome of loading a profile against the current machine.
Fields§
§profile: HnepProfileParsed HNEP.
host: HardwareInfoHost hardware at load time.
exact_match: boolWhether fingerprint matched exactly.
class_match: boolWhether silicon class matched (vendor/microarch/family/model).
policy: MismatchPolicyActive mismatch policy.
force_baseline: boolTrue if dispatch should use baseline only.
status: StringOperator-facing status line.
Implementations§
Source§impl LoadedProfile
impl LoadedProfile
Sourcepub fn load(path: &Path, policy: MismatchPolicy) -> Result<Self>
pub fn load(path: &Path, policy: MismatchPolicy) -> Result<Self>
Load from path and compare to live hardware.
Sourcepub fn from_parts(
profile: HnepProfile,
host: HardwareInfo,
policy: MismatchPolicy,
) -> Result<Self>
pub fn from_parts( profile: HnepProfile, host: HardwareInfo, policy: MismatchPolicy, ) -> Result<Self>
Construct from already-loaded pieces (tests / inject mock host).
Sourcepub fn select_workload(&self, workload: &str) -> &str
pub fn select_workload(&self, workload: &str) -> &str
Select variant for a workload by name (or baseline if forced).
Sourcepub fn select_size(&self, size_bytes: u64) -> &str
pub fn select_size(&self, size_bytes: u64) -> &str
Evaluate size-dependent tree, or baseline on mismatch / missing tree.
Sourcepub fn decision_tree(&self) -> Option<&DecisionTree>
pub fn decision_tree(&self) -> Option<&DecisionTree>
Access decision tree when present.
Sourcepub fn guarded_workload<'a>(
&'a self,
workload: &str,
available: &[&str],
minimum: Confidence,
) -> DispatchDecision<'a>
pub fn guarded_workload<'a>( &'a self, workload: &str, available: &[&str], minimum: Confidence, ) -> DispatchDecision<'a>
Select a workload only when its winner is supported by the application and meets its confidence floor. Always provide a real baseline handler. The available IDs must already be filtered for the host’s ISA support.
Sourcepub fn guarded_size<'a>(
&'a self,
bytes: u64,
available: &[&str],
) -> DispatchDecision<'a>
pub fn guarded_size<'a>( &'a self, bytes: u64, available: &[&str], ) -> DispatchDecision<'a>
Guard size dispatch against variant IDs absent from the host-compatible application registry. This does not infer confidence from tree leaves.
Trait Implementations§
Source§impl Clone for LoadedProfile
impl Clone for LoadedProfile
Source§fn clone(&self) -> LoadedProfile
fn clone(&self) -> LoadedProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more