diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..1fde4cf --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,41 @@ +pub enum NotationKind { + Iso, + Palmer, + Uns, + Alphanumeric, +} + +pub enum TeethKind { + Canine, + Incisor, + Premolar, + Molar, +} +#[derive(PartialEq, Clone, Copy)] +pub enum QuadrantKind { + TopLeft, + TopRight, + BottomLeft, + BottomRight, +} + +pub struct Teeth { + quadrant: QuadrantKind, + number: u8, + permanent: bool, +} + +impl Teeth { + pub fn new(number: u8, quadrant: QuadrantKind, permanent: bool) -> Teeth { + if !permanent && number > 5 { + panic!("Primary tooth number are in range [1; 5]"); + } + + Teeth { + number, + quadrant, + permanent, + } + } + +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..639a6f8 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,4 @@ +mod display; +mod lib; +fn main() { +}