1#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2#[derive(PartialEq, Eq, Clone, Debug, Default)]
3pub enum Content {
4 #[default]
5 Normal,
6 Fit,
7 Flex,
8}
9
10impl Content {
11 pub fn is_fit(&self) -> bool {
12 self == &Self::Fit
13 }
14
15 pub fn is_flex(&self) -> bool {
16 self == &Self::Flex
17 }
18}
19
20impl Content {
21 pub fn pretty(&self) -> String {
22 match self {
23 Self::Normal => "normal".to_owned(),
24 Self::Fit => "fit".to_owned(),
25 Self::Flex => "flex".to_owned(),
26 }
27 }
28}