CachePair

Trait CachePair 

Source
pub trait CachePair {
    const MAGIC_NUMBER: u64 = 409_454_158u64;
    const ARCHIVE_VERSION: u64 = 20u64;

    // Required methods
    fn new(
        toc_path: PathBuf,
        cache_path: PathBuf,
        is_post_ensmallening: bool,
    ) -> Self;
    fn is_post_ensmallening(&self) -> bool;
    fn toc_path(&self) -> PathBuf;
    fn cache_path(&self) -> PathBuf;
    fn read_toc(&mut self) -> Result<()>;
    fn unread_toc(&mut self);
}
Expand description

Cache pair trait.

Provided Associated Constants§

Source

const MAGIC_NUMBER: u64 = 409_454_158u64

The magic number for the cache pair.

Source

const ARCHIVE_VERSION: u64 = 20u64

The archive version for the cache pair.

Required Methods§

Source

fn new( toc_path: PathBuf, cache_path: PathBuf, is_post_ensmallening: bool, ) -> Self

Creates a new cache pair from the specified TOC and cache paths.

Source

fn is_post_ensmallening(&self) -> bool

Returns whether the package is post-ensmallening.

This is used to determine how to decompress the data from before “The Great Ensmallening” update of Warframe.

Source

fn toc_path(&self) -> PathBuf

Returns the Table of Contents (TOC) file path.

Source

fn cache_path(&self) -> PathBuf

Returns the cache file path.

Source

fn read_toc(&mut self) -> Result<()>

Reads the TOC file.

§Errors

Returns an error if the TOC file cannot be read.

Source

fn unread_toc(&mut self)

Unreads the TOC file.

This is used to reset the TOC file to the beginning.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§