pub struct LicenseExpression(/* private fields */);Expand description
A validated SPDX license expression.
Validates both the expression syntax and the license identifiers
against the SPDX license list (so typos like MIT-2.0 are rejected
even though they would parse syntactically).
Implementations§
Source§impl LicenseExpression
impl LicenseExpression
Sourcepub fn as_expression(&self) -> &Expression
pub fn as_expression(&self) -> &Expression
Returns a reference to the inner spdx::Expression.
Trait Implementations§
Source§impl Clone for LicenseExpression
impl Clone for LicenseExpression
Source§fn clone(&self) -> LicenseExpression
fn clone(&self) -> LicenseExpression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LicenseExpression
impl Debug for LicenseExpression
Source§impl<'de> Deserialize<'de> for LicenseExpression
impl<'de> Deserialize<'de> for LicenseExpression
Source§fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for LicenseExpression
impl Display for LicenseExpression
impl Eq for LicenseExpression
Source§impl From<LicenseExpression> for String
impl From<LicenseExpression> for String
Source§fn from(expr: LicenseExpression) -> Self
fn from(expr: LicenseExpression) -> Self
Converts to this type from the input type.
Source§impl FromStr for LicenseExpression
impl FromStr for LicenseExpression
Source§impl Hash for LicenseExpression
impl Hash for LicenseExpression
Source§impl PartialEq for LicenseExpression
impl PartialEq for LicenseExpression
Auto Trait Implementations§
impl Freeze for LicenseExpression
impl RefUnwindSafe for LicenseExpression
impl Send for LicenseExpression
impl Sync for LicenseExpression
impl Unpin for LicenseExpression
impl UnsafeUnpin for LicenseExpression
impl UnwindSafe for LicenseExpression
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.