umya_spreadsheet/structs/vml/spreadsheet/
clipboard_format_values.rs

1use super::super::super::EnumTrait;
2use std::str::FromStr;
3#[derive(Clone, Debug)]
4pub enum ClipboardFormatValues {
5    Bitmap,
6    Picture,
7    PictureOld,
8    PicturePrint,
9    PictureScreen,
10}
11impl Default for ClipboardFormatValues {
12    #[inline]
13    fn default() -> Self {
14        Self::PictureOld
15    }
16}
17impl EnumTrait for ClipboardFormatValues {
18    #[inline]
19    fn get_value_string(&self) -> &str {
20        match &self {
21            Self::Bitmap => "Bitmap",
22            Self::Picture => "Pict",
23            Self::PictureOld => "PictOld",
24            Self::PicturePrint => "PictPrint",
25            Self::PictureScreen => "PictScreen",
26        }
27    }
28}
29impl FromStr for ClipboardFormatValues {
30    type Err = ();
31    #[inline]
32    fn from_str(input: &str) -> Result<Self, Self::Err> {
33        match input {
34            "Bitmap" => Ok(Self::Bitmap),
35            "Pict" => Ok(Self::Picture),
36            "PictOld" => Ok(Self::PictureOld),
37            "PictPrint" => Ok(Self::PicturePrint),
38            "PictScreen" => Ok(Self::PictureScreen),
39            _ => Err(()),
40        }
41    }
42}