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.

Object Safety§

This trait is not object safe.

Implementors§