pub enum Token<'a> {
Spdx(LicenseId),
LicenseRef {
doc_ref: Option<&'a str>,
lic_ref: &'a str,
},
Exception(ExceptionId),
Plus,
OpenParen,
CloseParen,
With,
And,
Or,
}
Expand description
A single token in an SPDX license expression
Variants§
Spdx(LicenseId)
A recognized SPDX license id
LicenseRef
A LicenseRef-
prefixed id, with an optional DocumentRef-
Exception(ExceptionId)
A recognized SPDX exception id
Plus
A postfix +
indicating “or later” for a particular SPDX license id
OpenParen
A (
for starting a group
CloseParen
A )
for ending a group
With
A WITH
operator
And
An AND
operator
Or
An OR
operator
Trait Implementations§
impl<'a> Eq for Token<'a>
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
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