pub struct Cache { /* private fields */ }Implementations§
source§impl Cache
impl Cache
sourcepub fn open_with_store(store: Box<dyn Store>) -> Result<Cache, CacheError>
pub fn open_with_store(store: Box<dyn Store>) -> Result<Cache, CacheError>
sourcepub fn read(
&mut self,
archive: u8,
group: u32,
file: u16,
xtea_keys: Option<[u32; 4]>
) -> Result<Vec<u8>, CacheError>
pub fn read( &mut self, archive: u8, group: u32, file: u16, xtea_keys: Option<[u32; 4]> ) -> Result<Vec<u8>, CacheError>
Read a file from the cache
Arguments
archive- The archive to read fromgroup- The group to read fromfile- The file to readxtea_keys- The XTEA keys to use for decryption. If None, the file will not be decrypted
sourcepub fn read_named_group(
&mut self,
archive: u8,
group: &str,
file: u16,
xtea_keys: Option<[u32; 4]>
) -> Result<Vec<u8>, CacheError>
pub fn read_named_group( &mut self, archive: u8, group: &str, file: u16, xtea_keys: Option<[u32; 4]> ) -> Result<Vec<u8>, CacheError>
Read a file from the cache using a named group
Arguments
archive- The archive to read fromgroup- The group to read fromfile- The file to readxtea_keys- The XTEA keys to use for decryption. If None, the file will not be decrypted