[][src]Enum oceanpkg::drop::license::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<Expr, ParseError<'i>> where
    I: TryInto<Expr, 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 Clone for Expr[src]

impl Debug for Expr[src]

impl<'de> Deserialize<'de> for Expr[src]

impl Display for Expr[src]

impl Eq for Expr[src]

impl From<And> for Expr[src]

impl From<License> for Expr[src]

impl From<Or> for Expr[src]

impl From<SpdxLicense> for Expr[src]

impl Hash for Expr[src]

impl PartialEq<Expr> for Expr[src]

impl PartialEq<License> for Expr[src]

impl PartialEq<str> for Expr[src]

impl Serialize for Expr[src]

impl StructuralEq for Expr[src]

impl StructuralPartialEq 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.

Auto Trait Implementations

impl RefUnwindSafe for Expr

impl Send for Expr

impl Sync for Expr

impl Unpin for Expr

impl UnwindSafe for Expr

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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 = !

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.