pub struct Component {
pub id: ComponentId,
pub name: String,
pub version: Option<String>,
pub ecosystem: Option<String>,
pub supplier: Option<String>,
pub description: Option<String>,
pub purl: Option<String>,
pub licenses: BTreeSet<String>,
pub license_expression: Option<String>,
pub hashes: BTreeMap<String, String>,
pub source_ids: Vec<String>,
}Expand description
a software component (package, library, or application).
represents a single entry in the SBOM with all its metadata.
components are identified by their ComponentId and can have
relationships to other components via the dependency graph.
Fields§
§id: ComponentIdstable identifier for this component.
name: Stringpackage name (e.g., “serde”, “lodash”).
version: Option<String>package version (e.g., “1.0.0”, “4.17.21”).
ecosystem: Option<String>package ecosystem (e.g., “cargo”, “npm”, “pypi”).
supplier: Option<String>package supplier or publisher.
description: Option<String>human-readable description.
purl: Option<String>package URL per the purl spec.
licenses: BTreeSet<String>SPDX license identifiers (e.g., “MIT”, “Apache-2.0”).
license_expression: Option<String>the SPDX license expression the source document declared, when it declared one (e.g., “MIT OR Apache-2.0”).
licenses is the flattened identifier set of this
expression and stays populated either way; policy decisions should go
through licensing, which keeps the operators.
hashes: BTreeMap<String, String>checksums keyed by algorithm (e.g., “sha256” -> “abc123…”).
source_ids: Vec<String>original identifiers from the source document (e.g., SPDX SPDXRef, CycloneDX bom-ref).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Component
impl<'de> Deserialize<'de> for Component
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>,
impl Eq for Component
impl StructuralPartialEq for Component
Auto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnsafeUnpin for Component
impl UnwindSafe for Component
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.