add_one_john/
lib.rs

1//! # Art
2//!
3//! A library for modeling artistic concepts.
4pub use self::kinds::PrimaryColor;
5pub use self::kinds::SecondaryColor;
6pub use self::utils::mix;
7pub mod kinds {
8    /// The primary colors according to the RYB color model.
9    pub enum PrimaryColor {
10        Red,
11        Yellow,
12        Blue,
13    }
14
15    /// The secondary colors according to the RYB color model.
16    pub enum SecondaryColor {
17        Orange,
18        Green,
19        Purple,
20    }
21}
22
23pub mod utils {
24    use crate::kinds::*;
25
26    /// Combines two primary colors in equal amounts to create
27    /// a secondary color.
28    pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
29        // --snip--
30        SecondaryColor::Orange
31    }
32}
33fn main() {}