pub struct Indices(_);Expand description
A list of valid indices.
Implementations
Allocates an Index for every valid index file in the cache directory.
An index is considered valid if it is present. Meaning it will scan the directory for every index id from 0 up to 255 and load them into memory if the file exists. Any invalid indices are simply skipped.
Errors
Constructing this type is quite error prone, it needs to do quite a bit of book-keeping to get its allocation right. However, if the cache is unchanged and in its proper format it will, most likely, succeed.
The primary errors have to do with I/O, in order to read every index successfully it needs
a Dat2 reference and the metadata index.
If an index is found it needs to load its entire contents and parse it, failure at this point is considered a bug.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Indices
impl UnwindSafe for Indices
Blanket Implementations
Mutably borrows from an owned value. Read more