icondata_macros

Macro icon

Source
icon!() { /* proc-macro */ }
Expand description

§Icon Macro

This macro allows you to write icon!(IconName) instead of Icon::from(Library::IconName). It is simply a quality of life improvement, and is not required to use this crate. It is enabled with the macros feature.

§Example

use icondata::{icon, Icon};
 

let icon: Icon = icon!(AiFileImageTwotone);
assert_eq!(icon, Icon::from(icondata::AiIcon::AiFileImageTwotone));
// Instead of:
// let icon: Icon = Icon::from(AiIcon::AiFileImageTwotone);