pub struct RomanceConfig {
pub project: ProjectConfig,
pub backend: BackendConfig,
pub frontend: FrontendConfig,
pub codegen: CodegenConfig,
pub features: FeaturesConfig,
pub security: Option<SecurityConfig>,
pub storage: Option<StorageConfig>,
pub environment: EnvironmentConfig,
}Fields§
§project: ProjectConfig§backend: BackendConfig§frontend: FrontendConfig§codegen: CodegenConfig§features: FeaturesConfig§security: Option<SecurityConfig>§storage: Option<StorageConfig>§environment: EnvironmentConfigImplementations§
Source§impl RomanceConfig
impl RomanceConfig
pub fn load(dir: &Path) -> Result<Self>
Sourcepub fn load_with_env(dir: &Path) -> Result<Self>
pub fn load_with_env(dir: &Path) -> Result<Self>
Load config with environment-specific overrides.
- Loads base
romance.toml - Determines the active environment from
ROMANCE_ENVenv var (or from[environment] activein the base config), defaulting to “development” - If
romance.{env}.tomlexists (e.g.romance.production.toml), deep-merges those overrides on top of the base config
This is fully backward-compatible: projects without env-specific files behave exactly as before.
Sourcepub fn has_feature(&self, feature: &str) -> bool
pub fn has_feature(&self, feature: &str) -> bool
Check if a feature is enabled.
Trait Implementations§
Source§impl Debug for RomanceConfig
impl Debug for RomanceConfig
Source§impl<'de> Deserialize<'de> for RomanceConfig
impl<'de> Deserialize<'de> for RomanceConfig
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
Auto Trait Implementations§
impl Freeze for RomanceConfig
impl RefUnwindSafe for RomanceConfig
impl Send for RomanceConfig
impl Sync for RomanceConfig
impl Unpin for RomanceConfig
impl UnsafeUnpin for RomanceConfig
impl UnwindSafe for RomanceConfig
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