vrchatapi/models/
mime_type.rs

1/*
2 * VRChat API Documentation
3 *
4 *
5 * Contact: vrchatapi.lpv0t@aries.fyi
6 * Generated by: https://openapi-generator.tech
7 */
8
9use crate::models;
10use serde::{Deserialize, Serialize};
11
12#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
13pub enum MimeType {
14    #[serde(rename = "application/gzip")]
15    ApplicationSlashGzip,
16    #[serde(rename = "application/octet-stream")]
17    ApplicationSlashOctetStream,
18    #[serde(rename = "application/x-avatar")]
19    ApplicationSlashXAvatar,
20    #[serde(rename = "application/x-rsync-delta")]
21    ApplicationSlashXRsyncDelta,
22    #[serde(rename = "application/x-rsync-signature")]
23    ApplicationSlashXRsyncSignature,
24    #[serde(rename = "application/x-world")]
25    ApplicationSlashXWorld,
26    #[serde(rename = "image/bmp")]
27    ImageSlashBmp,
28    #[serde(rename = "image/gif")]
29    ImageSlashGif,
30    #[serde(rename = "image/jpeg")]
31    ImageSlashJpeg,
32    #[serde(rename = "image/jpg")]
33    ImageSlashJpg,
34    #[serde(rename = "image/png")]
35    ImageSlashPng,
36    #[serde(rename = "image/svg+xml")]
37    ImageSlashSvgxml,
38    #[serde(rename = "image/tiff")]
39    ImageSlashTiff,
40    #[serde(rename = "image/webp")]
41    ImageSlashWebp,
42}
43
44impl std::fmt::Display for MimeType {
45    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
46        match self {
47            Self::ApplicationSlashGzip => write!(f, "application/gzip"),
48            Self::ApplicationSlashOctetStream => write!(f, "application/octet-stream"),
49            Self::ApplicationSlashXAvatar => write!(f, "application/x-avatar"),
50            Self::ApplicationSlashXRsyncDelta => write!(f, "application/x-rsync-delta"),
51            Self::ApplicationSlashXRsyncSignature => write!(f, "application/x-rsync-signature"),
52            Self::ApplicationSlashXWorld => write!(f, "application/x-world"),
53            Self::ImageSlashBmp => write!(f, "image/bmp"),
54            Self::ImageSlashGif => write!(f, "image/gif"),
55            Self::ImageSlashJpeg => write!(f, "image/jpeg"),
56            Self::ImageSlashJpg => write!(f, "image/jpg"),
57            Self::ImageSlashPng => write!(f, "image/png"),
58            Self::ImageSlashSvgxml => write!(f, "image/svg+xml"),
59            Self::ImageSlashTiff => write!(f, "image/tiff"),
60            Self::ImageSlashWebp => write!(f, "image/webp"),
61        }
62    }
63}
64
65impl Default for MimeType {
66    fn default() -> MimeType {
67        Self::ApplicationSlashGzip
68    }
69}