balsa 0.3.2

Reference implementation for the Balsa molecular line notation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::{fmt, fmt::Write};

#[derive(Debug, PartialEq, Clone)]
pub enum AtomParity {
    Counterclockwise,
    Clockwise,
}

impl fmt::Display for AtomParity {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            Self::Counterclockwise => f.write_char('@'),
            Self::Clockwise => f.write_str("@@"),
        }
    }
}