[][src]Enum linfo::Expr

pub enum Expr {
    Single(License),
    Or(Or),
    And(And),
}

A license expression.

Grammar (note the padded spacing):

Single = License

Or = License " OR " License
   | License " OR " Or

And = License " AND " License
    | License " AND " And

Variants

Single(License)

Only one license's conditions to follow.

Or(Or)

The conditions of either of two or more licenses apply.

And(And)

The conditions of all of two or more licenses apply.

Methods

impl Expr[src]

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

Attempts to parse input and returns a ParseError on error.

pub fn as_slice(&self) -> &[License][src]

Returns the underlying slice of licenses.

Trait Implementations

impl From<SpdxLicense> for Expr[src]

impl From<License> for Expr[src]

impl From<Or> for Expr[src]

impl From<And> for Expr[src]

impl Clone for Expr[src]

impl Eq for Expr[src]

impl PartialEq<Expr> for Expr[src]

impl PartialEq<License> for Expr[src]

impl PartialEq<str> for Expr[src]

impl PartialEq<Expr> for str[src]

impl Display for Expr[src]

impl Debug for Expr[src]

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

type Error = ParseError<'a>

The type returned in the event of a conversion error.

impl Hash for Expr[src]

impl StructuralPartialEq for Expr[src]

impl StructuralEq for Expr[src]

Auto Trait Implementations

impl Send for Expr

impl Sync for Expr

impl Unpin for Expr

impl UnwindSafe for Expr

impl RefUnwindSafe for Expr

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]