pub struct CraSidecarMetadata {
pub security_contact: Option<String>,
pub vulnerability_disclosure_url: Option<String>,
pub support_end_date: Option<DateTime<Utc>>,
pub manufacturer_name: Option<String>,
pub manufacturer_email: Option<String>,
pub product_name: Option<String>,
pub product_version: Option<String>,
pub ce_marking_reference: Option<String>,
pub update_mechanism: Option<String>,
}Expand description
CRA sidecar metadata that supplements SBOM information
Fields§
§security_contact: Option<String>Security contact email or URL for vulnerability disclosure
vulnerability_disclosure_url: Option<String>URL for vulnerability disclosure policy/portal
support_end_date: Option<DateTime<Utc>>End of support/security updates date
manufacturer_name: Option<String>Manufacturer/vendor name (supplements SBOM creator info)
manufacturer_email: Option<String>Manufacturer contact email
product_name: Option<String>Product name (supplements SBOM document name)
product_version: Option<String>Product version
ce_marking_reference: Option<String>CE marking declaration reference (URL or document ID)
update_mechanism: Option<String>Security update delivery mechanism description
Implementations§
Source§impl CraSidecarMetadata
impl CraSidecarMetadata
Sourcepub fn from_json_file(path: &Path) -> Result<Self, CraSidecarError>
pub fn from_json_file(path: &Path) -> Result<Self, CraSidecarError>
Load sidecar metadata from a JSON file
Sourcepub fn from_yaml_file(path: &Path) -> Result<Self, CraSidecarError>
pub fn from_yaml_file(path: &Path) -> Result<Self, CraSidecarError>
Load sidecar metadata from a YAML file
Sourcepub fn from_file(path: &Path) -> Result<Self, CraSidecarError>
pub fn from_file(path: &Path) -> Result<Self, CraSidecarError>
Load sidecar metadata, auto-detecting format from extension
Sourcepub fn find_for_sbom(sbom_path: &Path) -> Option<Self>
pub fn find_for_sbom(sbom_path: &Path) -> Option<Self>
Try to find a sidecar file for the given SBOM path Looks for .cra.json or .cra.yaml files alongside the SBOM
Sourcepub const fn has_cra_data(&self) -> bool
pub const fn has_cra_data(&self) -> bool
Check if any CRA-relevant fields are populated
Sourcepub fn example_json() -> String
pub fn example_json() -> String
Generate an example sidecar file content
Trait Implementations§
Source§impl Clone for CraSidecarMetadata
impl Clone for CraSidecarMetadata
Source§fn clone(&self) -> CraSidecarMetadata
fn clone(&self) -> CraSidecarMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CraSidecarMetadata
impl Debug for CraSidecarMetadata
Source§impl Default for CraSidecarMetadata
impl Default for CraSidecarMetadata
Source§fn default() -> CraSidecarMetadata
fn default() -> CraSidecarMetadata
Source§impl<'de> Deserialize<'de> for CraSidecarMetadata
impl<'de> Deserialize<'de> for CraSidecarMetadata
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 CraSidecarMetadata
impl RefUnwindSafe for CraSidecarMetadata
impl Send for CraSidecarMetadata
impl Sync for CraSidecarMetadata
impl Unpin for CraSidecarMetadata
impl UnwindSafe for CraSidecarMetadata
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,
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