async_openai/types/videos/
impls.rs1use std::fmt::Display;
2
3use crate::types::videos::{VideoSeconds, VideoSize, VideoStatus};
4
5impl Display for VideoSize {
6 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7 write!(
8 f,
9 "{}",
10 match self {
11 Self::S720x1280 => "720x1280",
12 Self::S1280x720 => "1280x720",
13 Self::S1024x1792 => "1024x1792",
14 Self::S1792x1024 => "1792x1024",
15 }
16 )
17 }
18}
19
20impl Display for VideoSeconds {
21 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22 write!(
23 f,
24 "{}",
25 match self {
26 Self::Four => "4",
27 Self::Eight => "8",
28 Self::Twelve => "12",
29 }
30 )
31 }
32}
33
34impl Display for VideoStatus {
35 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
36 write!(
37 f,
38 "{}",
39 match self {
40 Self::Queued => "queued",
41 Self::InProgress => "in_progress",
42 Self::Completed => "completed",
43 Self::Failed => "failed",
44 }
45 )
46 }
47}