Skip to main content

sonacy_crate/
lib.rs

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