[−][src]Struct spdx::Licensee
A convenience wrapper for a license and optional exception that can be checked against a license requirement to see if it satisfies/matches the requirement
Methods
impl Licensee
[src]
pub fn new(license: LicenseItem, exception: Option<ExceptionId>) -> Self
[src]
Creates a licensee from its component parts. Note that use of SPDX's
or_later
is completely ignore for licensees as it only applies
to the license holder
pub fn parse(original: &str) -> Result<Self, ParseError>
[src]
Parses an simplified version of an SPDX license expression that can contain at most 1 valid SDPX license with an optional exception joined by a WITH.
eg <license-id>
| <license-id> WITH <exception-id>
pub fn satisfies(&self, req: &LicenseReq) -> bool
[src]
Determines whether the specified license requirement is satisfied by this license (+exception)
Trait Implementations
impl Eq for Licensee
[src]
impl PartialOrd<Licensee> for Licensee
[src]
fn partial_cmp(&self, other: &Licensee) -> Option<Ordering>
[src]
fn lt(&self, other: &Licensee) -> bool
[src]
fn le(&self, other: &Licensee) -> bool
[src]
fn gt(&self, other: &Licensee) -> bool
[src]
fn ge(&self, other: &Licensee) -> bool
[src]
impl PartialOrd<LicenseReq> for Licensee
[src]
fn partial_cmp(&self, o: &LicenseReq) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<Licensee> for Licensee
[src]
impl PartialEq<LicenseReq> for Licensee
[src]
impl Ord for Licensee
[src]
fn cmp(&self, other: &Licensee) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl Debug for Licensee
[src]
Auto Trait Implementations
impl Send for Licensee
impl Unpin for Licensee
impl Sync for Licensee
impl UnwindSafe for Licensee
impl RefUnwindSafe for Licensee
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,