pub struct CostModel {Show 31 fields
pub component_added: u32,
pub component_removed: u32,
pub version_patch: u32,
pub version_minor: u32,
pub version_major: u32,
pub license_changed: u32,
pub supplier_changed: u32,
pub ml_model_changed: u32,
pub dataset_changed: u32,
pub ml_approach_changed: u32,
pub ml_architecture_changed: u32,
pub ml_task_changed: u32,
pub ml_quantization_changed: u32,
pub ml_model_card_changed: u32,
pub ml_training_dataset_added: u32,
pub ml_training_dataset_removed: u32,
pub dataset_type_changed: u32,
pub dataset_governance_changed: u32,
pub dataset_sensitivity_added: u32,
pub dataset_sensitivity_removed: u32,
pub vulnerability_introduced: u32,
pub vulnerability_resolved: i32,
pub dependency_added: u32,
pub dependency_removed: u32,
pub hash_mismatch: u32,
pub crypto_algorithm_changed: u32,
pub crypto_downgrade: u32,
pub crypto_key_rotated: u32,
pub crypto_cert_expiry_changed: u32,
pub crypto_protocol_changed: u32,
pub crypto_quantum_level_changed: u32,
}Expand description
Cost model configuration for semantic diff operations.
Costs are used to determine the minimum-cost alignment between two SBOMs. Higher costs indicate more significant changes.
Fields§
§component_added: u32Cost for adding a new component
component_removed: u32Cost for removing a component
version_patch: u32Cost for patch version change
version_minor: u32Cost for minor version change
version_major: u32Cost for major version change
license_changed: u32Cost for license change
supplier_changed: u32Cost for supplier change
ml_model_changed: u32Cost for ML model metadata change
dataset_changed: u32Cost for dataset metadata change
ml_approach_changed: u32Cost for ML approach change (e.g. supervised -> reinforcement-learning)
ml_architecture_changed: u32Cost for ML architecture change (family or name, e.g. cnn -> transformer)
ml_task_changed: u32Cost for ML task change (e.g. nlp -> computer-vision)
ml_quantization_changed: u32Cost for ML quantization change (e.g. fp32 -> int4); a model-swap signal
ml_model_card_changed: u32Cost for ML model-card URL change
ml_training_dataset_added: u32Cost for adding a training dataset to a model
ml_training_dataset_removed: u32Cost for removing a training dataset from a model (provenance loss; HIGH)
dataset_type_changed: u32Cost for dataset type change (e.g. training -> validation)
dataset_governance_changed: u32Cost for dataset governance owners change
dataset_sensitivity_added: u32Cost for adding a dataset sensitivity classification (e.g. gaining PII; HIGH)
dataset_sensitivity_removed: u32Cost for removing a dataset sensitivity classification
vulnerability_introduced: u32Cost for introducing a vulnerability
vulnerability_resolved: i32Reward (negative cost) for resolving a vulnerability
dependency_added: u32Cost for adding a dependency
dependency_removed: u32Cost for removing a dependency
hash_mismatch: u32Cost for hash mismatch (integrity concern)
crypto_algorithm_changed: u32Cost for crypto algorithm family change
crypto_downgrade: u32Cost for crypto security downgrade (weaker algorithm or lower security level)
crypto_key_rotated: u32Cost for crypto key rotation
crypto_cert_expiry_changed: u32Cost for certificate expiry date change
crypto_protocol_changed: u32Cost for protocol version change
crypto_quantum_level_changed: u32Cost for quantum security level change
Implementations§
Source§impl CostModel
impl CostModel
Sourcepub fn security_focused() -> Self
pub fn security_focused() -> Self
Create a security-focused cost model
Sourcepub fn compliance_focused() -> Self
pub fn compliance_focused() -> Self
Create a compliance-focused cost model
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CostModel
impl<'de> Deserialize<'de> for CostModel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CostModel
impl RefUnwindSafe for CostModel
impl Send for CostModel
impl Sync for CostModel
impl Unpin for CostModel
impl UnsafeUnpin for CostModel
impl UnwindSafe for CostModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more