1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use serde::{Deserialize, Serialize};

#[derive(Copy, Clone, Serialize, Deserialize, Debug, Hash, PartialEq, Eq)]
pub enum Limit {
    TwentyFive,
    Fifty,
    OneHundred,
}

impl Default for Limit {
    fn default() -> Self {
        Limit::TwentyFive
    }
}

impl Limit {
    pub fn as_str(&self) -> &str {
        match self {
            Limit::TwentyFive => "25",
            Limit::Fifty => "50",
            Limit::OneHundred => "100",
        }
    }
}