periodic_table_rs/lib.rs
1//! This is a chemsistry library for Rust.
2//!
3//! For now, it only contains constants for each of the elements of the periodic table,
4//! but in the future, I'd like it to be able to do calculations on molecules such as
5//! determining if they're bonded ionically, covalently, or metalically and finding their
6//! molecular masses.
7//!
8//! Here's a quick example to get you up and running.
9//!
10//! ```rust
11//! /* Note: These snippets are untested */
12//!
13//! use periodic_table_rs::HYDROGEN;
14//!
15//! fn main() {
16//! println!("{}", HYDROGEN.atomic_mass);
17//! println!("{}", HYDROGEN.boiling_point);
18//! println!("{}", HYDROGEN.density);
19//! }
20//! ```
21//! ```rust
22//! /* Or, you can do this. */
23//!
24//! use periodic_table_rs::{Element, PERIODIC_TABLE};
25//!
26//! fn main() {
27//! const HYDROGEN: Element = PERIODIC_TABLE[0];
28//!
29//! println!("{}", HYDROGEN.atomic_mass);
30//! println!("{}", HYDROGEN.boiling_point);
31//! println!("{}", HYDROGEN.density);
32//! }
33//! ```
34
35pub mod element;
36pub use element::{
37 Color, ElectronConfigurationPart, Element, GroupBlock, MatterState, Name, Orbital, Symbol, YearDiscovered,
38};
39
40pub mod table;
41pub use table::PERIODIC_TABLE;
42
43pub mod elements;
44pub use elements::*;