#[non_exhaustive]pub struct Package {Show 13 fields
pub name: Option<String>,
pub full_name: Option<String>,
pub owner: Option<String>,
pub package_url: Option<String>,
pub date_created: OffsetDateTime,
pub date_updated: OffsetDateTime,
pub uuid4: Option<String>,
pub rating_score: Option<u32>,
pub is_pinned: Option<bool>,
pub is_deprecated: Option<bool>,
pub has_nsfw_content: Option<bool>,
pub categories: Vec<String>,
pub versions: Vec<Version>,
}Expand description
Represents a mod package from the Thunderstore API.
This struct contains information about a mod package, including its metadata and all available versions.
#[non_exhaustive]: fields may be added as the Thunderstore API grows, so
downstream code cannot construct or exhaustively destructure this directly.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<String>The short name of the package
full_name: Option<String>The full name of the package, typically in format “Owner-Name”
owner: Option<String>The username of the package owner
package_url: Option<String>The URL to the package’s page on Thunderstore
date_created: OffsetDateTimeWhen the package was first published
date_updated: OffsetDateTimeWhen the package was last updated
uuid4: Option<String>Unique identifier for the package
rating_score: Option<u32>User rating score for the package
is_pinned: Option<bool>Whether the package is pinned by Thunderstore
is_deprecated: Option<bool>Whether the package is marked as deprecated
has_nsfw_content: Option<bool>Whether the package contains NSFW content
categories: Vec<String>List of categories the package belongs to
versions: Vec<Version>All available versions of the package
Implementations§
Source§impl Package
impl Package
Sourcepub fn latest_version(&self) -> Option<&Version>
pub fn latest_version(&self) -> Option<&Version>
The most recently created version, or None for a package with no
versions.
Ordering is by date_created, not by version number, so a republished
older version wins over a higher version string. This matches how
Thunderstore itself presents “latest”.
Trait Implementations§
Source§impl Debug for Package
Shows only the most relevant fields: the full name, and the latest version’s
dependencies and download URL.
impl Debug for Package
Shows only the most relevant fields: the full name, and the latest version’s dependencies and download URL.