Struct amethyst_config::ConfigMeta [] [src]

pub struct ConfigMeta {
    pub path: PathBuf,
    pub fields: Vec<String>,
    pub parent: Option<Box<ConfigMeta>>,
    pub ty: &'static str,
    pub name: &'static str,
    pub bad_value: bool,
    pub options: Vec<String>,
}

Metadata for a configuration structure

Fields

path: PathBuf

Where the file is located, defaults to "config/config.yml"

fields: Vec<String>

List from top-level to bottom-level configs

parent: Option<Box<ConfigMeta>>

Parent meta

ty: &'static str

String representation of the type

name: &'static str

Name of the field

bad_value: bool

Whether key is bad or not

options: Vec<String>

Options to display to user, usually used for enums

Methods

impl ConfigMeta
[src]

fn tree(&self) -> String

Displays the meta's fields in order e.g. Config->nested_config->field

fn root(&self) -> ConfigMeta

Returns the highest level parent or the root meta of the configuration

Trait Implementations

impl Debug for ConfigMeta
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for ConfigMeta
[src]

fn clone(&self) -> ConfigMeta

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Default for ConfigMeta
[src]

fn default() -> Self

Returns the "default value" for a type. Read more