Function libxivdat::xiv_macro::icon::macro_icon_from_key_and_id[][src]

pub fn macro_icon_from_key_and_id(key: &str, id: &str) -> Option<MacroIcon>
Expand description

Returns the MacroIcon corresponding to the raw values of the key and icon Sections of a macro.

[None] is only returned if the provided key and id values are completely invalid. Values of “000” and “0000000” (used for undefined macros) are considered valid and return MacroIcon::NoIcon.

Examples

use libxivdat::xiv_macro::icon::{MacroIcon,macro_icon_from_key_and_id};

let key_val = "014";
let id_val = "00005E9";
assert_eq!(macro_icon_from_key_and_id(key_val, id_val).unwrap(), MacroIcon::ItemHammer);