pub struct Assets {
pub client: String,
pub files: BTreeMap<String, Option<FileChecksum>>,
}Expand description
Checksum inventory for one patched client installation.
Fields§
§client: StringHuman-readable client profile represented by the inventory.
files: BTreeMap<String, Option<FileChecksum>>Case-normalized filename to measured checksum, or None when explicitly unknown.
Implementations§
Source§impl Assets
impl Assets
Sourcepub fn bundled() -> Result<Self>
pub fn bundled() -> Result<Self>
Load the checksum inventory compiled into the library without filesystem access.
§Errors
Returns an error if the bundled inventory cannot be decoded.
Sourcepub fn scan_all(directory: &Path) -> Result<Self>
pub fn scan_all(directory: &Path) -> Result<Self>
Inventory installed validation files, zone/model archives, and zone lists.
§Errors
Returns an error when the installation cannot be read or a discovered inventory entry is invalid.
Sourcepub fn scan(directory: &Path, names: &[String]) -> Result<Self>
pub fn scan(directory: &Path, names: &[String]) -> Result<Self>
Measure requested files in the installation, omitting files that are absent.
§Errors
Returns an error when a requested name is unsafe or a present file cannot be read.
Sourcepub fn file_response(&self, manifest: &[u8]) -> Result<FileResponse>
pub fn file_response(&self, manifest: &[u8]) -> Result<FileResponse>
Build the checksum response requested by a world or zone manifest. Unknown files receive zero and are returned for caller diagnostics; the server decides whether that response is sufficient for admission.
§Errors
Returns an error when the manifest is malformed.
Sourcepub fn spells(&self) -> Result<&FileChecksum>
pub fn spells(&self) -> Result<&FileChecksum>
Return the spell-file metadata used by the V62 CRC1 response.
§Errors
Returns an error when the inventory has no measured spell file.