crystallographic_group/database/
crystal_system.rs

1use std::fmt::Display;
2
3#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)]
4pub enum CrystalSystem {
5    #[default]
6    Triclinic,
7    Monoclinic,
8    Orthorhombic,
9    Tetragonal,
10    Trigonal,
11    Hexagonal,
12    Cubic,
13}
14
15impl Display for CrystalSystem {
16    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17        let name = format!("{:?}", self).to_lowercase();
18        write!(f, "{}", name)
19    }
20}