async_openai/types/files/
impls.rs

1use std::fmt::Display;
2
3use crate::types::files::{FileExpirationAfterAnchor, FilePurpose};
4
5impl Display for FilePurpose {
6    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7        write!(
8            f,
9            "{}",
10            match self {
11                Self::Assistants => "assistants",
12                Self::Batch => "batch",
13                Self::FineTune => "fine-tune",
14                Self::Vision => "vision",
15                Self::UserData => "user_data",
16                Self::Evals => "evals",
17            }
18        )
19    }
20}
21
22impl Display for FileExpirationAfterAnchor {
23    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24        write!(
25            f,
26            "{}",
27            match self {
28                Self::CreatedAt => "created_at",
29            }
30        )
31    }
32}