use crate::types::*; use shuttle_runtime::SecretStore; /// From is an implementation of the EnvType trait. /// This implementation is used to get the environment type from the secret store. /// The default environment type is Dev. impl From for EnvType { fn from(secret: SecretStore) -> Self { Self::from_env_types::(secret) } } /// FromKey is an implementation of the EnvType trait. /// This implementation is used to get the environment type from the secret store. impl FromKey for EnvType { fn from_key(secret: SecretStore) -> Self { EnvType::from_env_types::(secret) } } /// AsEnvTypeStr is an implementation of the AsEnvTypeStr trait. /// This implementation is used to get the environment type from the secret store. impl AsEnvStr for SecretStore { fn as_env_str(&self) -> String where T: EnvKey, { self.get(T::key()).unwrap_or_default() } }