pub enum Reason {
UnknownLicense,
UnknownException,
InvalidCharacters,
UnclosedParens,
UnopenedParens,
Empty,
Unexpected(&'static [&'static str]),
SeparatedPlus,
UnknownTerm,
GnuNoPlus,
}
Expand description
The particular reason for a ParseError
Variants§
UnknownLicense
The specified license short-identifier was not found the SPDX list
UnknownException
The specified exception short-identifier was not found the SPDX list
InvalidCharacters
The characters are not valid in an SDPX license expression
UnclosedParens
An opening parens was unmatched with a closing parens
UnopenedParens
A closing parens was unmatched with an opening parens
Empty
The expression does not contain any valid terms
Unexpected(&'static [&'static str])
Found an unexpected term, which wasn’t one of the expected terms that is listed
SeparatedPlus
A + was found after whitespace, which is not allowed by the SPDX spec
UnknownTerm
When lexing, a term was found that was
- Not a license short-id
- Not an exception short-id
- Not a document/license ref
- Not an AND, OR, or WITH
GnuNoPlus
GNU suffix licenses don’t allow +
because they already have
the -or-later
suffix to denote that
Trait Implementations§
impl Eq for Reason
impl StructuralPartialEq for Reason
Auto Trait Implementations§
impl Freeze for Reason
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnwindSafe for Reason
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more