readarr/models/
import_list_type.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum ImportListType {
17 #[serde(rename = "program")]
18 Program,
19 #[serde(rename = "goodreads")]
20 Goodreads,
21 #[serde(rename = "other")]
22 Other,
23
24}
25
26impl std::fmt::Display for ImportListType {
27 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
28 match self {
29 Self::Program => write!(f, "program"),
30 Self::Goodreads => write!(f, "goodreads"),
31 Self::Other => write!(f, "other"),
32 }
33 }
34}
35
36impl Default for ImportListType {
37 fn default() -> ImportListType {
38 Self::Program
39 }
40}
41