blight_k_guessing_name/
lib.rs

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