Struct spdx::LicenseReq
source · pub struct LicenseReq {
pub license: LicenseItem,
pub exception: Option<ExceptionId>,
}
Expand description
Represents a single license requirement, which must include a valid
LicenseItem
, and may allow current and future versions of the license,
and may also allow for a specific exception
While they can be constructed manually, most of the time these will
be parsed and combined in an Expression
Fields§
§license: LicenseItem
The license
exception: Option<ExceptionId>
The exception allowed for this license, as specified following
the WITH
operator
Trait Implementations§
source§impl AsRef<LicenseReq> for Licensee
impl AsRef<LicenseReq> for Licensee
source§fn as_ref(&self) -> &LicenseReq
fn as_ref(&self) -> &LicenseReq
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for LicenseReq
impl Clone for LicenseReq
source§fn clone(&self) -> LicenseReq
fn clone(&self) -> LicenseReq
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LicenseReq
impl Debug for LicenseReq
source§impl Display for LicenseReq
impl Display for LicenseReq
source§impl From<LicenseId> for LicenseReq
impl From<LicenseId> for LicenseReq
source§impl Ord for LicenseReq
impl Ord for LicenseReq
source§fn cmp(&self, other: &LicenseReq) -> Ordering
fn cmp(&self, other: &LicenseReq) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<LicenseReq> for Licensee
impl PartialEq<LicenseReq> for Licensee
source§fn eq(&self, o: &LicenseReq) -> bool
fn eq(&self, o: &LicenseReq) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for LicenseReq
impl PartialEq for LicenseReq
source§fn eq(&self, other: &LicenseReq) -> bool
fn eq(&self, other: &LicenseReq) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LicenseReq> for Licensee
impl PartialOrd<LicenseReq> for Licensee
source§fn partial_cmp(&self, o: &LicenseReq) -> Option<Ordering>
fn partial_cmp(&self, o: &LicenseReq) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd for LicenseReq
impl PartialOrd for LicenseReq
source§fn partial_cmp(&self, other: &LicenseReq) -> Option<Ordering>
fn partial_cmp(&self, other: &LicenseReq) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for LicenseReq
impl StructuralPartialEq for LicenseReq
Auto Trait Implementations§
impl RefUnwindSafe for LicenseReq
impl Send for LicenseReq
impl Sync for LicenseReq
impl Unpin for LicenseReq
impl UnwindSafe for LicenseReq
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