pub struct Cache {
pub store: Box<dyn Store>,
/* private fields */
}
Fields§
§store: Box<dyn Store>
Store
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
Auto Trait Implementations§
impl Freeze for Cache
impl !RefUnwindSafe for Cache
impl !Send for Cache
impl !Sync for Cache
impl Unpin for Cache
impl !UnwindSafe for Cache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more