dartboard-core 0.1.2

Core canvas model, color types, client traits, and wire protocol for dartboard
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct RgbColor {
    pub r: u8,
    pub g: u8,
    pub b: u8,
}

impl RgbColor {
    pub const fn new(r: u8, g: u8, b: u8) -> Self {
        Self { r, g, b }
    }
}