Enum spdx::LicenseItem[][src]

pub enum LicenseItem {
    Spdx {
        id: LicenseId,
        or_later: bool,
    },
    Other {
        doc_ref: Option<String>,
        lic_ref: String,
    },
}

A single license term in a license expression, according to the SPDX spec. This can be either an SPDX license, which is mapped to a LicenseId from a valid SPDX short identifier, or else a document AND/OR license ref

Variants

Spdx

A regular SPDX license id

Fields of Spdx

id: LicenseIdor_later: bool

Indicates the license had a +, allowing the licensee to license the software under either the specific version, or any later versions

Other

Fields of Other

doc_ref: Option<String>

Purpose: Identify any external SPDX documents referenced within this SPDX document. See the spec for more details.

lic_ref: String

Purpose: Provide a locally unique identifier to refer to licenses that are not found on the SPDX License List. See the spec for more details.

Implementations

impl LicenseItem[src]

pub fn id(&self) -> Option<LicenseId>[src]

Returns the license identifier, if it is a recognized SPDX license and not a license referencer

Trait Implementations

impl Clone for LicenseItem[src]

impl Debug for LicenseItem[src]

impl Display for LicenseItem[src]

impl Eq for LicenseItem[src]

impl Ord for LicenseItem[src]

impl PartialEq<LicenseItem> for LicenseItem[src]

impl PartialOrd<LicenseItem> for LicenseItem[src]

impl StructuralEq for LicenseItem[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.