source
ModuleWhere config contents come from.
Contents
use utopia_config::Environment;Rust
pub struct EnvironmentThe process environment, read once when created: an array of variable names to values.
Rust
use utopia_config::{Environment, Source, Value};
let env = Environment::new();
assert!(matches!(env.contents(), Value::Array(_)));Also implements
Default.use utopia_config::File;Rust
pub struct FileA file's contents, read once when created; null when it does not exist or cannot be read.
Rust
use utopia_config::{File, Source, Value};
assert_eq!(File::new("/nonexistent/config.json").contents(), &Value::Null);use utopia_config::Variable;Rust
pub struct VariableContents given directly: a string to parse, or an array.
Rust
use utopia_config::{Source, Value, Variable};
assert_eq!(Variable::new("KEY=value").contents(), &Value::from("KEY=value"));use utopia_config::Source;Rust
pub trait Source