[−][src]Enum linfo::expr::Expr
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]
I: TryInto<Self, Error = ParseError<'i>> + 'i,
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]
fn from(l: SpdxLicense) -> Self
[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.
fn try_from(s: &'a str) -> Result<Self, Self::Error>
[src]
impl Hash for Expr
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,