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.
Trait Implementations§
Source§impl Clone for LoadedProfile
impl Clone for LoadedProfile
Source§fn clone(&self) -> LoadedProfile
fn clone(&self) -> LoadedProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LoadedProfile
impl RefUnwindSafe for LoadedProfile
impl Send for LoadedProfile
impl Sync for LoadedProfile
impl Unpin for LoadedProfile
impl UnsafeUnpin for LoadedProfile
impl UnwindSafe for LoadedProfile
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