In [2]:
:dep chemcore="0.3.0"
In [4]:
use chemcore::molecule::{ DefaultMolecule, Error, Atom, BondOrder, Element };
In [7]:
let molecule: Result<DefaultMolecule, Error> = DefaultMolecule::from_adjacency(vec![
    (Atom::new(Element::H, 0, 0, None, None), vec![
        (1, BondOrder::Single, None)
    ]),
    (Atom::new(Element::H, 0, 0, None, None), vec![
        (0, BondOrder::Single, None),
        (2, BondOrder::Single, None)
    ]),
    (Atom::new(Element::H, 0, 0, None, None), vec![
        (1, BondOrder::Single, None)
    ])
]);

molecule
Out[7]:
Err(Hypervalent(1))