pub enum LicenseItem {
Spdx {
id: LicenseId,
or_later: bool,
},
Other(Box<LicenseRef>),
}Expand description
A single license term in a license expression, according to the SPDX spec.
This can be either an SPDX license, which is mapped to a LicenseId from
a valid SPDX short identifier, or else a document and/or license ref
Variants§
Spdx
A regular SPDX license id
Fields
Other(Box<LicenseRef>)
SPDX allows the use of LicenseRef-<user supplied string> to provide
arbitrary licenses that aren’t a part of the official SPDX license list
Implementations§
Trait Implementations§
Source§impl Clone for LicenseItem
impl Clone for LicenseItem
Source§fn clone(&self) -> LicenseItem
fn clone(&self) -> LicenseItem
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LicenseItem
impl Debug for LicenseItem
Source§impl Display for LicenseItem
impl Display for LicenseItem
Source§impl Ord for LicenseItem
impl Ord for LicenseItem
Source§impl PartialEq for LicenseItem
impl PartialEq for LicenseItem
Source§impl PartialOrd for LicenseItem
impl PartialOrd for LicenseItem
impl Eq for LicenseItem
Auto Trait Implementations§
impl Freeze for LicenseItem
impl RefUnwindSafe for LicenseItem
impl Send for LicenseItem
impl Sync for LicenseItem
impl Unpin for LicenseItem
impl UnwindSafe for LicenseItem
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more