pub struct Metadata {
pub name: String,
pub version: String,
pub short_description: Option<String>,
pub description: Option<String>,
pub homepage: Option<String>,
pub repository: Option<String>,
pub license: Option<String>,
}
Expand description
Information about a particular module that can be used by the host for things like introspection and search.
Fields§
§name: String
A short, human-friendly name used to identify this module.
version: String
A semver-compliant version number.
short_description: Option<String>
A short, one-line description.
description: Option<String>
A more elaborate description.
homepage: Option<String>
A link to the homepage.
repository: Option<String>
A link to the source code.
license: Option<String>
The name of the software license(s) this software is released under.
This is interpreted as a SPDX license expression (e.g. MIT OR Apache-2.0
). See the SPDX site for more information.
Implementations§
source§impl Metadata
impl Metadata
sourcepub fn with_short_description(self, short_description: impl Into<String>) -> Self
pub fn with_short_description(self, short_description: impl Into<String>) -> Self
Set the Metadata::short_description
field.
sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the Metadata::description
field.
sourcepub fn with_homepage(self, homepage: impl Into<String>) -> Self
pub fn with_homepage(self, homepage: impl Into<String>) -> Self
Set the Metadata::homepage
field.
sourcepub fn with_repository(self, repository: impl Into<String>) -> Self
pub fn with_repository(self, repository: impl Into<String>) -> Self
Set the Metadata::repository
field.
sourcepub fn with_license(self, license: impl Into<String>) -> Self
pub fn with_license(self, license: impl Into<String>) -> Self
Set the Metadata::license
field.