Skip to main content

mylib/
lib.rs

1pub mod bytes;
2pub mod gates;
3#[cfg(test)]
4mod tests;
5
6use std::fmt;
7#[derive(PartialEq, Copy, Clone, Debug)]
8pub enum Signal {
9    One,
10    Zero,
11}
12
13impl fmt::Display for Signal {
14    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15        match self {
16            Self::One => write!(f, "1"),
17            Self::Zero => write!(f, "0"),
18        }
19    }
20}