[−][src]Enum oceanpkg::drop::license::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<Expr, ParseError<'i>> where
I: TryInto<Expr, Error = ParseError<'i>> + 'i,
[src]
I: TryInto<Expr, 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 Clone for Expr
[src]
impl Debug for Expr
[src]
impl<'de> Deserialize<'de> for Expr
[src]
fn deserialize<D>(
deserializer: D
) -> Result<Expr, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Expr, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
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]
fn from(l: SpdxLicense) -> Expr
[src]
impl Hash for Expr
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Expr> for Expr
[src]
impl PartialEq<License> for Expr
[src]
impl PartialEq<str> for Expr
[src]
impl Serialize for Expr
[src]
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl StructuralEq for Expr
[src]
impl StructuralPartialEq for Expr
[src]
impl<'a> TryFrom<&'a str> for Expr
[src]
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]
T: 'static + ?Sized,
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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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 = !
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>,