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 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”).
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>,
Deserialize this value from the given Serde deserializer. Read more
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 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.