[][src]Enum linfo::License

pub enum License {
    Spdx(SpdxLicense),
    // some variants omitted
}

A known license.

Variants

A commonly found license listed here.

Methods

impl License[src]

pub fn parse<'a, I>(input: I) -> Result<Self, ParseError<'a>> where
    I: TryInto<Self, Error = ParseError<'a>>, 
[src]

Attempts to parse input and returns a ParseError on error.

pub fn id(&self) -> &str[src]

Returns the string identifier of this license. This is usually the same string used to parse the license.

Trait Implementations

impl From<License> for Expr[src]

impl From<SpdxLicense> for License[src]

impl Clone for License[src]

impl Eq for License[src]

impl PartialEq<License> for Expr[src]

impl PartialEq<License> for License[src]

impl Display for License[src]

impl Debug for License[src]

impl<'a> TryFrom<&'a str> for License[src]

type Error = ParseError<'a>

The type returned in the event of a conversion error.

impl Hash for License[src]

impl StructuralPartialEq for License[src]

impl StructuralEq for License[src]

Auto Trait Implementations

impl Send for License

impl Sync for License

impl Unpin for License

impl UnwindSafe for License

impl RefUnwindSafe for License

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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