Struct lice::types::License

source ·
pub struct License {
Show 13 fields pub name: String, pub license_id: String, pub see_also: Vec<String>, pub is_osi_approved: bool, pub is_fsf_libre: Option<bool>, pub is_deprecated_license_id: bool, pub reference: Option<String>, pub details_url: Option<String>, pub reference_number: Option<u32>, pub license_text: Option<String>, pub standard_license_template: Option<String>, pub license_text_html: Option<String>, pub cross_ref: Option<Vec<CrossRef>>,
}
Expand description

The License Object.

The License Object is a JSON object that contains the details of a license.

When the license is returned as part of a list of licenses, the following fields are present:

  • reference
  • detailsUrl
  • referenceNumber

When the license is returned as a single license, the following fields are present:

  • licenseText
  • standardLicenseTemplate
  • licenseTextHtml
  • crossRef

Fields§

§name: String

The license name.

§license_id: String

The license ID.

§see_also: Vec<String>

A list of URLs to other resources related to the license.

§is_osi_approved: bool

Whether or not the license is OSI approved.

§is_fsf_libre: Option<bool>

Whether or not the license is FSF libre.

§is_deprecated_license_id: bool

Whether or not the license is deprecated.

§reference: Option<String>

A reference to the license.

§details_url: Option<String>

The URL to the license details.

§reference_number: Option<u32>

The license reference number.

§license_text: Option<String>

License text.

§standard_license_template: Option<String>

Standard license template.

§license_text_html: Option<String>

License text in HTML format.

§cross_ref: Option<Vec<CrossRef>>

A list of cross references.

Trait Implementations§

source§

impl Clone for License

source§

fn clone(&self) -> License

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for License

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for License

source§

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 Merge for License

source§

fn merge(&mut self, other: Self)

Merge another object into this object.
source§

impl PartialEq for License

source§

fn eq(&self, other: &License) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for License

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,