[][src]Enum cargo_rpm::license::License

pub enum License {
    AGPL_3_0_ONLY,
    AGPL_3_0_OR_LATER,
    APACHE_2_0,
    BSD_2_CLAUSE,
    BSD_3_CLAUSE,
    CC0_1_0,
    GPL_2_0_ONLY,
    GPL_2_0_OR_LATER,
    GPL_3_0_ONLY,
    GPL_3_0_OR_LATER,
    LGPL_2_0_ONLY,
    LGPL_2_0_OR_LATER,
    LGPL_2_1_ONLY,
    LGPL_2_1_OR_LATER,
    LGPL_3_0_ONLY,
    LGPL_3_0_OR_LATER,
    MIT,
    MPL_2_0,
}

Licenses for which we have a defined mapping between SPDX 2.1 labels and the RPM License field.

Variants

AGPL_3_0_ONLY

GNU Affero General Public License v3.0 only https://spdx.org/licenses/AGPL-3.0-only.html

AGPL_3_0_OR_LATER

GNU Affero General Public License v3.0 or later https://spdx.org/licenses/AGPL-3.0-or-later.html

APACHE_2_0BSD_2_CLAUSE

BSD 2-Clause "Simplified" License https://spdx.org/licenses/BSD-2-Clause.html

BSD_3_CLAUSE

BSD 3-Clause "New" or "Revised" License https://spdx.org/licenses/BSD-3-Clause.html

CC0_1_0

Creative Commons Zero v1.0 Universal https://spdx.org/licenses/CC0-1.0.html

GPL_2_0_ONLY

GNU General Public License v2.0 only https://spdx.org/licenses/GPL-2.0-only.html

GPL_2_0_OR_LATER

GNU General Public License v2.0 or later https://spdx.org/licenses/GPL-2.0-or-later.html

GPL_3_0_ONLY

GNU General Public License v3.0 only https://spdx.org/licenses/GPL-3.0-only.html

GPL_3_0_OR_LATER

GNU General Public License v3.0 or later https://spdx.org/licenses/GPL-3.0-or-later.html

LGPL_2_0_ONLY

GNU Library General Public License v2 only https://spdx.org/licenses/LGPL-2.0-only.html

LGPL_2_0_OR_LATER

GNU Library General Public License v2 or later https://spdx.org/licenses/LGPL-2.0-or-later.html

LGPL_2_1_ONLY

GNU Lesser General Public License v2.1 only https://spdx.org/licenses/LGPL-2.1-only.html

LGPL_2_1_OR_LATER

GNU Lesser General Public License v2.1 or later https://spdx.org/licenses/LGPL-2.1-or-later.html

LGPL_3_0_ONLY

GNU Lesser General Public License v3.0 only https://spdx.org/licenses/LGPL-3.0-only.html

LGPL_3_0_OR_LATER

GNU Lesser General Public License v3.0 or later https://spdx.org/licenses/LGPL-3.0-or-later.html

MITMPL_2_0

Mozilla Public License 2.0 https://spdx.org/licenses/MPL-2.0.html

Methods

impl License[src]

pub fn parse(name: &str) -> Result<Self, Error>[src]

Parse a specific license into the License enum

pub fn as_rpm_str(&self) -> &'static str[src]

Return a license name from the Fedora Licenses table: https://fedoraproject.org/wiki/Licensing:Main

Auto Trait Implementations

impl Sync for License

impl Send for License

impl Unpin for License

impl RefUnwindSafe for License

impl UnwindSafe for License

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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

impl<T> AsAny for T where
    T: Any
[src]