Function rscache::util::osrs::parse_defs[][src]

pub fn parse_defs<T: Definition, S: Store>(
    cache: &Cache<S>,
    archive_id: u32
) -> Result<HashMap<u16, T>>
Expand description

Parses all definitions read from the passed Cache<S> from archive_id.

Errors

Can return multiple errors: if reading, decoding or parsing definition buffers fail.

Examples

let archive_id = 10; // Archive containing item definitions.
let item_defs: HashMap<u16, ItemDefinition> = util::osrs::parse_defs(&cache, archive_id)?;