Skip to main content

update_config

Function update_config 

Source
pub fn update_config(delta: Value) -> Result<(), NeuxcfgError>
Expand description

Applies a partial update to the project configuration via deep merge.

Only the provided keys are modified; all other keys remain unchanged.

§Parameters

  • delta – A toml::Value (usually a table) to merge into the existing config.

§Errors

Returns NeuxcfgError::ProjectNotFound if the project has not been initialized, or validation/TOML parse errors.

§Examples

use age_setup::config::{init, update_config};
use toml::toml;

init()?;
let delta = toml! {
    [project]
    custom_setting = "enabled"
};
update_config(toml::Value::Table(delta))?;