Enum license::Kind [] [src]

pub enum Kind {
    Agpl3(Agpl3),
    Apache2(Apache2),
    Cc01(Cc01),
    Gpl3(Gpl3),
    Lgpl3(Lgpl3),
    Mit(Mit),
    Mpl2(Mpl2),
    Unlicense(Unlicense),
}

Enum containing all supported licenses.

Examples

use std::str::FromStr;
use license::*;

// From the license text:
let apache2 = Kind::from_str(include_str!("../files/APACHE-2"));
assert_eq!(apache2, Ok(Kind::Apache2(Apache2)));

// From the license id:
let gpl3 = Kind::from_str("GPL-3.0");
assert_eq!(gpl3, Ok(Kind::Gpl3(Gpl3)));

Variants

The Unlicense.

Trait Implementations

impl Clone for Kind
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Kind
[src]

[src]

Formats the value using the given formatter.

impl Eq for Kind
[src]

impl PartialEq for Kind
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Hash for Kind
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for Kind
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for Kind
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl License for Kind
[src]

[src]

The name of the license. Read more

[src]

The identifier of the license. Read more

[src]

The license text.

[src]

The permissions of the license.

[src]

The conditions of the license.

[src]

The limitations of the license.

[src]

Says if the license is OSI approved. Read more

[src]

The homepage of the license.

impl FromStr for Kind
[src]

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more

impl From<Agpl3> for Kind
[src]

[src]

Performs the conversion.

impl From<Apache2> for Kind
[src]

[src]

Performs the conversion.

impl From<Cc01> for Kind
[src]

[src]

Performs the conversion.

impl From<Gpl3> for Kind
[src]

[src]

Performs the conversion.

impl From<Lgpl3> for Kind
[src]

[src]

Performs the conversion.

impl From<Mit> for Kind
[src]

[src]

Performs the conversion.

impl From<Mpl2> for Kind
[src]

[src]

Performs the conversion.

impl From<Unlicense> for Kind
[src]

[src]

Performs the conversion.

impl Display for Kind
[src]

[src]

Formats the value using the given formatter. Read more

impl AsRef<str> for Kind
[src]

[src]

Performs the conversion.

impl AsRef<OsStr> for Kind
[src]

[src]

Performs the conversion.

impl AsRef<[u8]> for Kind
[src]

[src]

Performs the conversion.