princemuel_art/
lib.rs

1//! # Art
2//!
3//! A library form modeling artistic concepts
4
5pub use self::kinds::PrimaryColor;
6pub use self::kinds::SecondaryColor;
7pub use self::utils::mix;
8
9pub mod kinds {
10    /// The primary colors according to the RYB color model
11    pub enum PrimaryColor {
12        Red,
13        Yellow,
14        Blue,
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 olors in equal amounts
28    /// to create a secondary color
29    pub fn mix(_a: PrimaryColor, _b: PrimaryColor) -> SecondaryColor {
30        // --snip--
31        // ANCHOR_END: here
32        SecondaryColor::Orange
33        // ANCHOR: here
34    }
35}