pub enum DeployEnv {
Dev,
Staging,
Prod,
}Expand description
Represents a validated DEPLOY_ENVIRONMENT configuration.
Variants§
Implementations§
Source§impl DeployEnv
impl DeployEnv
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Read a DeployEnv from env, or err if it was invalid / didn’t exist.
Sourcepub fn is_staging_or_prod(self) -> bool
pub fn is_staging_or_prod(self) -> bool
Shorthand to check whether this DeployEnv is staging or prod.
Sourcepub fn validate_network(&self, network: Network) -> Result<()>
pub fn validate_network(&self, network: Network) -> Result<()>
Validate the Network parameter for this deploy environment.
Sourcepub fn validate_sgx(&self, use_sgx: bool) -> Result<()>
pub fn validate_sgx(&self, use_sgx: bool) -> Result<()>
Validate the SGX/[use_]sgx parameter for this deploy environment.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DeployEnv
impl<'de> Deserialize<'de> for DeployEnv
Source§fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for DeployEnv
impl Ord for DeployEnv
Source§impl PartialOrd for DeployEnv
impl PartialOrd for DeployEnv
impl Copy for DeployEnv
impl Eq for DeployEnv
impl StructuralPartialEq for DeployEnv
Auto Trait Implementations§
impl Freeze for DeployEnv
impl RefUnwindSafe for DeployEnv
impl Send for DeployEnv
impl Sync for DeployEnv
impl Unpin for DeployEnv
impl UnsafeUnpin for DeployEnv
impl UnwindSafe for DeployEnv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more