gmaps_static/
scale.rs

1use std::fmt;
2
3pub static SCALE1: &Scale = &Scale::S1;
4pub static SCALE2: &Scale = &Scale::S2;
5
6#[derive(Clone)]
7pub enum Scale {
8    S1,
9    S2,
10}
11
12impl fmt::Display for Scale {
13    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
14        use Scale::*;
15        write!(
16            f,
17            "{}",
18            match self {
19                S1 => "1",
20                S2 => "2",
21            }
22        )
23    }
24}