pub type ServerConfig = Yaml;
Expand description
Represents the server configuration object. This is a type alias for Yaml
from the yaml_rust2
crate.
Aliased Type§
enum ServerConfig {
Real(String),
Integer(i64),
String(String),
Boolean(bool),
Array(Vec<Yaml>),
Hash(LinkedHashMap<Yaml, Yaml>),
Alias(usize),
Null,
BadValue,
}
Variants§
Real(String)
Float types are stored as String and parsed on demand.
Note that f64
does NOT implement Eq trait and can NOT be stored in BTreeMap
.
Integer(i64)
YAML int is stored as i64.
String(String)
YAML scalar.
Boolean(bool)
YAML bool, e.g. true
or false
.
Array(Vec<Yaml>)
YAML array, can be accessed as a [Vec
].
Hash(LinkedHashMap<Yaml, Yaml>)
YAML hash, can be accessed as a [LinkedHashMap
].
Insertion order will match the order of insertion into the map.
Alias(usize)
Alias, not fully supported yet.
Null
YAML null, e.g. null
or ~
.
BadValue
Accessing a nonexistent node via the Index trait returns BadValue
. This
simplifies error handling in the calling code. Invalid type conversion also
returns BadValue
.