Struct spdx_rs::models::SimpleExpression
source · pub struct SimpleExpression {
pub identifier: String,
pub document_ref: Option<String>,
pub license_ref: bool,
}
Expand description
Simple SPDX license expression.
Fields§
§identifier: String
The license identifier.
document_ref: Option<String>
Optional DocumentRef for the expression.
license_ref: bool
true
if the expression is a user defined license reference.
Implementations§
source§impl SimpleExpression
impl SimpleExpression
sourcepub const fn new(
identifier: String,
document_ref: Option<String>,
license_ref: bool
) -> SimpleExpression
pub const fn new( identifier: String, document_ref: Option<String>, license_ref: bool ) -> SimpleExpression
Create a new simple expression.
sourcepub fn parse(expression: &str) -> Result<SimpleExpression, SpdxExpressionError>
pub fn parse(expression: &str) -> Result<SimpleExpression, SpdxExpressionError>
Trait Implementations§
source§impl Clone for SimpleExpression
impl Clone for SimpleExpression
source§fn clone(&self) -> SimpleExpression
fn clone(&self) -> SimpleExpression
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 SimpleExpression
impl Debug for SimpleExpression
source§impl<'de> Deserialize<'de> for SimpleExpression
impl<'de> Deserialize<'de> for SimpleExpression
source§fn deserialize<D>(
deserializer: D
) -> Result<SimpleExpression, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<SimpleExpression, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for SimpleExpression
impl Display for SimpleExpression
source§impl Hash for SimpleExpression
impl Hash for SimpleExpression
source§impl PartialEq<SimpleExpression> for SimpleExpression
impl PartialEq<SimpleExpression> for SimpleExpression
source§fn eq(&self, other: &SimpleExpression) -> bool
fn eq(&self, other: &SimpleExpression) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SimpleExpression
impl Serialize for SimpleExpression
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for SimpleExpression
impl StructuralEq for SimpleExpression
impl StructuralPartialEq for SimpleExpression
Auto Trait Implementations§
impl RefUnwindSafe for SimpleExpression
impl Send for SimpleExpression
impl Sync for SimpleExpression
impl Unpin for SimpleExpression
impl UnwindSafe for SimpleExpression
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