pub struct Cache { /* private fields */ }
Expand description

A complete virtual representation of the RuneScape cache file system.

Implementations

Creates a high level virtual memory map over the cache directory.

All files are isolated on allocation by keeping them as in-memory files.

Errors

The bulk of the errors which might occur are mostely I/O related due to acquiring file handles.

Other errors might include protocol changes in newer caches. Any error unrelated to I/O at this stage should be considered a bug.

Generate a checksum based on the current cache.

The Checksum acts as a validator for individual cache files. Any RuneScape client will request a list of crc’s to check the validity of all of the file data that was transferred.

Available on crate feature rs3 only.

Generate a checksum based on the current cache with RSA encryption.

RsaChecksum wraps a regular Checksum with the added benefit of encrypting the whirlpool hash into the checksum buffer.

Retrieves and constructs data corresponding to the given index and archive.

Errors

When trying to retrieve data from an index or an archive that does not exist the IndexNotFound or ArchiveNotFound errors are returned, respectively.

Any other errors such as sector validation failures or failed parsers should be considered a bug.

Retrieves and writes data corresponding to the given index and archive into W.

Errors

See the error section on read for more details.

Retrieves the huffman table.

Required when decompressing chat messages, see Huffman.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.