pub trait License {
// Required methods
fn id(&self) -> &'static str;
fn name(&self) -> &'static str;
fn text(&self) -> &'static str;
fn header(&self) -> Option<&'static str>;
fn is_osi_approved(&self) -> bool;
fn is_fsf_libre(&self) -> bool;
fn is_deprecated(&self) -> bool;
fn comments(&self) -> Option<&'static str>;
fn see_also(&self) -> &'static [&'static str];
}
Expand description
Base functionality for all licenses.
Required Methods§
Sourcefn id(&self) -> &'static str
fn id(&self) -> &'static str
The identifier of the license.
Corresponds to the Identifier column from spdx.org/licenses.
Sourcefn name(&self) -> &'static str
fn name(&self) -> &'static str
The name of the license.
Corresponds to the Full name column from spdx.org/licenses.
Sourcefn is_osi_approved(&self) -> bool
fn is_osi_approved(&self) -> bool
Says if the license is OSI approved.
Corresponds to the OSI Approved? column from spdx.org/licenses.
Sourcefn is_fsf_libre(&self) -> bool
fn is_fsf_libre(&self) -> bool
Says if the license is FSF Libre.
Corresponds to the FSF Free/Libre? column from spdx.org/licenses.
Sourcefn is_deprecated(&self) -> bool
fn is_deprecated(&self) -> bool
Says if the license is deprecated.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for &dyn License
impl<'de> Deserialize<'de> for &dyn License
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