metaculus 0.4.0

API Client for Metaculus
Documentation
/*
 * Metaculus API
 *
 * Welcome to the unofficial Rust client for the Metaculus API
 *
 * The version of the OpenAPI document: 1.0
 * Contact: Benjamin Manns <opensource@benmanns.com>
 * Generated by: https://openapi-generator.tech
 */

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RepeatPatternEnum {
    #[serde(rename = "NO_REPEAT")]
    NoRepeat,
    #[serde(rename = "VALUE_REPEAT")]
    ValueRepeat,
    #[serde(rename = "DAILY")]
    Daily,
    #[serde(rename = "WEEKLY")]
    Weekly,
    #[serde(rename = "MONTHLY")]
    Monthly,
    #[serde(rename = "ANNUALLY")]
    Annually,
}

impl ToString for RepeatPatternEnum {
    fn to_string(&self) -> String {
        match self {
            Self::NoRepeat => String::from("NO_REPEAT"),
            Self::ValueRepeat => String::from("VALUE_REPEAT"),
            Self::Daily => String::from("DAILY"),
            Self::Weekly => String::from("WEEKLY"),
            Self::Monthly => String::from("MONTHLY"),
            Self::Annually => String::from("ANNUALLY"),
        }
    }
}

impl Default for RepeatPatternEnum {
    fn default() -> RepeatPatternEnum {
        Self::NoRepeat
    }
}