Struct rs3cache_backend::index::CacheIndex
source · pub struct CacheIndex<S: IndexState> { /* private fields */ }
Expand description
Container of Archive
s.
Implementations§
source§impl CacheIndex<Initial>
impl CacheIndex<Initial>
sourcepub fn new(index_id: u32, input: CachePath) -> CacheResult<CacheIndex<Initial>>
pub fn new(index_id: u32, input: CachePath) -> CacheResult<CacheIndex<Initial>>
source§impl<S> CacheIndex<S>where
S: IndexState,
impl<S> CacheIndex<S>where S: IndexState,
sourcepub fn get_file(&self, metadata: &Metadata) -> CacheResult<Bytes>
pub fn get_file(&self, metadata: &Metadata) -> CacheResult<Bytes>
Executes a sql command to retrieve an archive from the cache.
sourcepub fn assert_coherence(&self) -> Result<(), IntegrityError>
pub fn assert_coherence(&self) -> Result<(), IntegrityError>
Assert whether the cache held by self
is in a coherent state.
Errors
May raise CrcError
, VersionError
or ArchiveNotFoundError
if the cache is not in a logical state.
Notes
Indices VORBIS
, AUDIOSTREAMS
, TEXTURES_PNG_MIPPED
and TEXTURES_ETC
tend to never complete.
For these, simply ignore ArchiveNotFoundError
.
source§impl<S> CacheIndex<S>where
S: IndexState,
impl<S> CacheIndex<S>where S: IndexState,
sourcepub fn index_id(&self) -> u32
pub fn index_id(&self) -> u32
The index id of self
,
corresponding to the raw/js5-{index_id}.jcache
file being held.
sourcepub fn metadatas(&self) -> &IndexMetadata
pub fn metadatas(&self) -> &IndexMetadata
Returns a view over the IndexMetadata
of self
.
sourcepub fn archive(&self, archive_id: u32) -> CacheResult<Archive>
pub fn archive(&self, archive_id: u32) -> CacheResult<Archive>
Trait Implementations§
source§impl IntoIterator for CacheIndex<Initial>
impl IntoIterator for CacheIndex<Initial>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for CacheIndex<S>
impl<S> Send for CacheIndex<S>where S: Send,
impl<S> !Sync for CacheIndex<S>
impl<S> Unpin for CacheIndex<S>where S: Unpin,
impl<S> !UnwindSafe for CacheIndex<S>
Blanket Implementations§
§impl<T, I> IntoPyDict for Iwhere
T: PyDictItem,
I: IntoIterator<Item = T>,
impl<T, I> IntoPyDict for Iwhere T: PyDictItem, I: IntoIterator<Item = T>,
§fn into_py_dict(self, py: Python<'_>) -> &PyDict
fn into_py_dict(self, py: Python<'_>) -> &PyDict
Converts self into a
PyDict
object pointer. Whether pointer owned or borrowed
depends on implementation.