pub struct InternedPackageManifest {Show 15 fields
pub interner: StringInterner,
pub names: Vec<Option<InternKey>>,
pub full_names: Vec<Option<InternKey>>,
pub owners: Vec<Option<InternKey>>,
pub package_urls: Vec<Option<InternKey>>,
pub dates_created: Vec<OffsetDateTime>,
pub dates_updated: Vec<OffsetDateTime>,
pub uuid4s: Vec<Option<InternKey>>,
pub rating_scores: Vec<Option<u32>>,
pub is_pinned: Vec<Option<bool>>,
pub is_deprecated: Vec<Option<bool>>,
pub has_nsfw_content: Vec<Option<bool>>,
pub categories: Vec<Vec<InternKey>>,
pub version_ranges: Vec<(usize, usize)>,
pub versions: InternedVersionManifest,
}Expand description
Struct-of-Arrays representation of the package manifest with interned strings.
This structure builds upon the PackageManifest format by adding string interning to further reduce memory usage and improve serialization efficiency. Repeated strings like author names, categories, and URLs are stored once in the interner and referenced by integer keys throughout the structure.
String interning is particularly beneficial for the Valheim mod ecosystem where the same authors maintain multiple packages and common patterns appear frequently in metadata.
Fields§
§interner: StringInterner§names: Vec<Option<InternKey>>§full_names: Vec<Option<InternKey>>§owners: Vec<Option<InternKey>>§package_urls: Vec<Option<InternKey>>§dates_created: Vec<OffsetDateTime>§dates_updated: Vec<OffsetDateTime>§uuid4s: Vec<Option<InternKey>>§rating_scores: Vec<Option<u32>>§is_pinned: Vec<Option<bool>>§is_deprecated: Vec<Option<bool>>§has_nsfw_content: Vec<Option<bool>>§categories: Vec<Vec<InternKey>>§version_ranges: Vec<(usize, usize)>§versions: InternedVersionManifestImplementations§
Source§impl InternedPackageManifest
impl InternedPackageManifest
Sourcepub fn resolve_name_at(&self, idx: usize) -> Option<String>
pub fn resolve_name_at(&self, idx: usize) -> Option<String>
Resolves the package name at the given index from the string interner.
§Returns
The resolved string if a name exists at the index, otherwise None.
Sourcepub fn resolve_full_name_at(&self, idx: usize) -> Option<String>
pub fn resolve_full_name_at(&self, idx: usize) -> Option<String>
Resolves the full package name at the given index from the string interner.
§Returns
The resolved string if a full name exists at the index, otherwise None.
Sourcepub fn resolve_owner_at(&self, idx: usize) -> Option<String>
pub fn resolve_owner_at(&self, idx: usize) -> Option<String>
Resolves the package owner at the given index from the string interner.
§Returns
The resolved string if an owner exists at the index, otherwise None.
Sourcepub fn get_package_by_full_name(&self, full_name: &str) -> Option<Package>
pub fn get_package_by_full_name(&self, full_name: &str) -> Option<Package>
Sourcepub fn find_index_by_full_name(&self, full_name: &str) -> Option<usize>
pub fn find_index_by_full_name(&self, full_name: &str) -> Option<usize>
Sourcepub fn get_package_at(&self, idx: usize) -> Package
pub fn get_package_at(&self, idx: usize) -> Package
Sourcepub fn get_latest_version_at(&self, idx: usize) -> Option<usize>
pub fn get_latest_version_at(&self, idx: usize) -> Option<usize>
Trait Implementations§
Source§impl Clone for InternedPackageManifest
impl Clone for InternedPackageManifest
Source§fn clone(&self) -> InternedPackageManifest
fn clone(&self) -> InternedPackageManifest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more