Enum spdx::lexer::ParseMode[][src]

pub enum ParseMode {
    Strict,
    Lax,
}

Available modes when parsing SPDX expressions

Variants

Strict

Strict SPDX parsing.

  1. Only license identifiers in the SPDX license list, or Document/LicenseRef, are allowed. The license identifiers are also case-sensitive.
  2. WITH, AND, and OR are the only valid operators
Lax

Allow non-conforming syntax for crates-io compatibility

  1. Additional, invalid, identifiers are accepted and mapped to a correct SPDX license identifier. See identifiers::IMPRECISE_NAMES for the list of additionally accepted identifiers and the license they correspond to.
  2. / can by used as a synonym for OR, and doesn’t need to be separated by whitespace from the terms it combines

Trait Implementations

impl Clone for ParseMode[src]

impl Copy for ParseMode[src]

impl PartialEq<ParseMode> for ParseMode[src]

impl StructuralPartialEq for ParseMode[src]

Auto Trait Implementations

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> 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, 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.