pub struct PackageInfo {
pub directory: String,
pub name: String,
pub version: String,
pub size: u64,
pub sha256: String,
pub updated_at: i64,
pub game: String,
pub display_name: Option<String>,
pub description: Option<String>,
pub exclusive_group: Option<String>,
pub requires: Vec<String>,
}Expand description
One installable package as listed by GET /packages.
Fields§
§directory: StringThe access directory, [a-z0-9_-]+.
name: StringThe path under directory without .zip, e.g. codriver/polish/male/Kamil.
A lookup key: check it with valid_name, never join it onto a filesystem path.
version: String§size: u64Bytes in the zip.
sha256: StringLowercase hex sha256 of the zip, which the installer verifies after downloading.
updated_at: i64Unix seconds.
game: StringOne of GAME_*.
display_name: Option<String>Renames the leaf only; the levels above it always come from name.
description: Option<String>§exclusive_group: Option<String>Packages in one group overwrite the same files, so at most one of them is installed.
requires: Vec<String>PackageRefs in their directory/name text form.
Implementations§
Source§impl PackageInfo
impl PackageInfo
pub fn is_public(&self) -> bool
pub fn package_ref(&self) -> PackageRef
pub fn segments(&self) -> Split<'_, char> ⓘ
Sourcepub fn tree_levels(&self) -> Vec<&str>
pub fn tree_levels(&self) -> Vec<&str>
The segments between the category and the leaf; empty for style/Descriptive.
pub fn leaf(&self) -> &str
Sourcepub fn download_path(&self) -> String
pub fn download_path(&self) -> String
The tail of GET /download/<game>/<directory>/<name>.
pub fn requires_ref(&self, reference: &PackageRef) -> bool
Sourcepub fn required_refs(&self) -> Vec<PackageRef>
pub fn required_refs(&self) -> Vec<PackageRef>
Drops malformed entries, which manifest gen already warned the publisher about.
Trait Implementations§
Source§impl Clone for PackageInfo
impl Clone for PackageInfo
Source§fn clone(&self) -> PackageInfo
fn clone(&self) -> PackageInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more