brk_cohort 0.1.3

Cohort definitions used throughout BRK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde::Serialize;

/// Display names for a cohort with id (for storage/API), short (for charts), and long (for tooltips/labels)
#[derive(Clone, Copy, Serialize)]
pub struct CohortName {
    pub id: &'static str,
    pub short: &'static str,
    pub long: &'static str,
}

impl CohortName {
    pub const fn new(id: &'static str, short: &'static str, long: &'static str) -> Self {
        Self { id, short, long }
    }
}