code0-flow 0.0.29

Crate for managing the code0-flows inside of the Flow Queue & FlowStore
Documentation
use std::str::FromStr;

#[derive(Debug, PartialEq, Eq)]
pub enum Environment {
    Development,
    Staging,
    Production,
}

impl FromStr for Environment {
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.to_lowercase().as_str() {
            "staging" => Ok(Environment::Staging),
            "production" => Ok(Environment::Production),
            "development" => Ok(Environment::Development),
            _ => Ok(Environment::Development),
        }
    }
}