| Crates.io | chemistru-elements-macro |
| lib.rs | chemistru-elements-macro |
| version | 0.3.0 |
| created_at | 2023-10-02 10:42:53.329215+00 |
| updated_at | 2023-10-09 11:04:09.728529+00 |
| description | Create Constants For Every Element |
| homepage | https://github.com/Ross-Morgan/chemistru-elements-macro |
| repository | https://github.com/Ross-Morgan/chemistru-elements-macro |
| max_upload_size | |
| id | 989798 |
| size | 189,077 |
This macro depends on the chemistru-elements crate for the Element type.
Using the load_elements macro will create a constant of type chemistru_elements::Element for every element.
use chemistru_element::Element;
use chemistru_element_macro::load_elements;
mod elements {
load_elements!();
}
fn f() {
let water = (Elements::HYDROGEN, Elements::OXYGEN, Elements::HYDROGEN);
}
Periodic table data provided by Bowserinator (github)