1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use self::Type::*;

/// The Different types of Instant Answers.
#[derive(Clone, Copy, Debug, Deserialize)]
pub enum Type {
    /// An Article about the answer.
    #[serde(rename="A")]
    Article,
    /// A Disambiguation of the answer.
    #[serde(rename="D")]
    Disambiguation,
    /// Category
    #[serde(rename="C")]
    Category,
    /// Name
    #[serde(rename="N")]
    Name,
    /// Exclusive
    #[serde(rename="E")]
    Exclusive,
    /// Instant Answer has no type.
    #[serde(rename="")]
    Nothing,
}

impl Default for Type {
    fn default() -> Self {
        Nothing
    }
}