Skip to main content

set_extra

Function set_extra 

Source
pub fn set_extra(key: &str, value: Value) -> Result<(), NeuxcfgError>
Expand description

Sets a single extra field in the project configuration.

This is a convenience wrapper around load_config and save_config.

§Parameters

  • key – The extra field name (must not start with _ or contain .).
  • value – A toml::Value to store.

§Errors

Returns NeuxcfgError variants from loading, validation, or saving.

§Examples

use age_setup::config::{init, set_extra};
use toml::Value;

init()?;
set_extra("api_endpoint", Value::String("https://api.example.com".into()))?;