Struct serde_spdx::spdx::v_2_3::Spdx

source ·
pub struct Spdx {
Show 16 fields pub spdxid: String, pub annotations: Option<Vec<SpdxItemAnnotations>>, pub comment: Option<String>, pub creation_info: SpdxCreationInfo, pub data_license: String, pub document_describes: Option<Vec<String>>, pub document_namespace: String, pub external_document_refs: Option<Vec<SpdxItemExternalDocumentRefs>>, pub files: Option<Vec<SpdxItemFiles>>, pub has_extracted_licensing_infos: Option<Vec<SpdxItemHasExtractedLicensingInfos>>, pub name: String, pub packages: Option<Vec<SpdxItemPackages>>, pub relationships: Option<Vec<SpdxItemRelationships>>, pub revieweds: Option<Vec<SpdxItemRevieweds>>, pub snippets: Option<Vec<SpdxItemSnippets>>, pub spdx_version: String,
}

Fields§

§spdxid: String

Uniquely identify any element in an SPDX document which may be referenced by other elements.

§annotations: Option<Vec<SpdxItemAnnotations>>

Provide additional information about an SpdxElement.

§comment: Option<String>§creation_info: SpdxCreationInfo

One instance is required for each SPDX file produced. It provides the necessary information for forward and backward compatibility for processing tools.

§data_license: String

License expression for dataLicense. See SPDX Annex D for the license expression syntax. Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields (“SPDX-Metadata”). The SPDX specification contains numerous fields where an SPDX document creator may provide relevant explanatory text in SPDX-Metadata. Without opining on the lawfulness of “database rights” (in jurisdictions where applicable), such explanatory text is copyrightable subject matter in most Berne Convention countries. By using the SPDX specification, or any portion hereof, you hereby agree that any copyright rights (as determined by your jurisdiction) in any SPDX-Metadata, including without limitation explanatory text, shall be subject to the terms of the Creative Commons CC0 1.0 Universal license. For SPDX-Metadata not containing any copyright rights, you hereby agree and acknowledge that the SPDX-Metadata is provided to you “as-is” and without any representations or warranties of any kind concerning the SPDX-Metadata, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non-infringement, or the absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.

§document_describes: Option<Vec<String>>

DEPRECATED: use relationships instead of this field. Packages, files and/or Snippets described by this SPDX document

§document_namespace: String

The URI provides an unambiguous mechanism for other SPDX documents to reference SPDX elements within this SPDX document.

§external_document_refs: Option<Vec<SpdxItemExternalDocumentRefs>>

Identify any external SPDX documents referenced within this SPDX document.

§files: Option<Vec<SpdxItemFiles>>

Files referenced in the SPDX document

§has_extracted_licensing_infos: Option<Vec<SpdxItemHasExtractedLicensingInfos>>

Indicates that a particular ExtractedLicensingInfo was defined in the subject SpdxDocument.

§name: String

Identify name of this SpdxElement.

§packages: Option<Vec<SpdxItemPackages>>

Packages referenced in the SPDX document

§relationships: Option<Vec<SpdxItemRelationships>>

Relationships referenced in the SPDX document

§revieweds: Option<Vec<SpdxItemRevieweds>>

Reviewed

§snippets: Option<Vec<SpdxItemSnippets>>

Snippets referenced in the SPDX document

§spdx_version: String

Provide a reference number that can be used to understand how to parse and interpret the rest of the file. It will enable both future changes to the specification and to support backward compatibility. The version number consists of a major and minor version indicator. The major field will be incremented when incompatible changes between versions are made (one or more sections are created, modified or deleted). The minor field will be incremented when backwards compatible changes are made.

Trait Implementations§

source§

impl Clone for Spdx

source§

fn clone(&self) -> Spdx

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Spdx

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Spdx

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<Spdx> for Spdx

source§

fn eq(&self, other: &Spdx) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Spdx

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Spdx

Auto Trait Implementations§

§

impl RefUnwindSafe for Spdx

§

impl Send for Spdx

§

impl Sync for Spdx

§

impl Unpin for Spdx

§

impl UnwindSafe for Spdx

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,