1use std::fmt;
2
3#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5pub enum BondKind {
6 Covalent,
8 Ionic,
10 Metallic,
12 Coordinate,
14 Hydrogen,
16 Aromatic,
18 VanDerWaals,
20 DipoleDipole,
22 LondonDispersion,
24 Unknown,
26}
27
28impl fmt::Display for BondKind {
29 fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
30 let value = match self {
31 Self::Covalent => "covalent",
32 Self::Ionic => "ionic",
33 Self::Metallic => "metallic",
34 Self::Coordinate => "coordinate",
35 Self::Hydrogen => "hydrogen",
36 Self::Aromatic => "aromatic",
37 Self::VanDerWaals => "van der Waals",
38 Self::DipoleDipole => "dipole-dipole",
39 Self::LondonDispersion => "London dispersion",
40 Self::Unknown => "unknown",
41 };
42
43 formatter.write_str(value)
44 }
45}