periodic_table/
element.rs

1/// Contains the information of a single element
2#[derive(Debug)]
3pub struct Element {
4    pub atomic_number: u32,
5    pub symbol: &'static str,
6    pub name: &'static str,
7    pub atomic_mass: &'static str,
8    pub cpk_hex_color: &'static str,
9    pub electronic_configuration: &'static str,
10    pub electronegativity: Option<f32>,
11    pub atomic_radius: Option<u32>,
12    pub ion_radius: Option<IonRadius>,
13    pub van_del_waals_radius: Option<u32>,
14    pub ionization_energy: Option<u32>,
15    pub electron_affinity: Option<i32>,
16    pub oxidation_states: &'static [i32],
17    pub standard_state: Option<State>,
18    pub bonding_type: &'static str,
19    pub melting_point: Option<u32>,
20    pub boiling_point: Option<u32>,
21    pub density: Option<f32>,
22    pub group_block: &'static str,
23    pub year_discovered: Year,
24}
25
26/// The three possible states
27#[derive(Debug)]
28pub enum State {
29    Solid,
30    Liquid,
31    Gas,
32}
33
34#[derive(Debug)]
35pub struct IonRadius {
36    pub radius: f32,
37    pub variation: &'static str,
38}
39
40#[derive(Debug)]
41pub enum Year {
42    Ancient,
43    Known(u16),
44}