chemistru-elements-macro

Crates.iochemistru-elements-macro
lib.rschemistru-elements-macro
version0.3.0
sourcesrc
created_at2023-10-02 10:42:53.329215
updated_at2023-10-09 11:04:09.728529
descriptionCreate Constants For Every Element
homepagehttps://github.com/Ross-Morgan/chemistru-elements-macro
repositoryhttps://github.com/Ross-Morgan/chemistru-elements-macro
max_upload_size
id989798
size189,077
Cryptollusion (Ross-Morgan)

documentation

README

chemistru-elements-macro

Requirements

This macro depends on the chemistru-elements crate for the Element type.

Function / Use

Using the load_elements macro will create a constant of type chemistru_elements::Element for every element.

Example:

use chemistru_element::Element;
use chemistru_element_macro::load_elements;

mod elements {
    load_elements!();
}

fn f() {
    let water = (Elements::HYDROGEN, Elements::OXYGEN, Elements::HYDROGEN);
}

Attribution

Periodic table data provided by Bowserinator (github)

Commit count: 30

cargo fmt