use serde::{Deserialize, Serialize};
/// Supported media types.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[non_exhaustive]
pub enum MediaType {
/// Image sample.
Image,
/// Text sample.
Text,
/// Audio sample.
Audio,
/// Video sample.
Video,
}
impl std::fmt::Display for MediaType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
MediaType::Image => write!(f, "image"),
MediaType::Text => write!(f, "text"),
MediaType::Audio => write!(f, "audio"),
MediaType::Video => write!(f, "video"),
}
}
}