Struct asciii::CONFIG [−]
pub struct CONFIG { /* fields omitted */ }
Static ConfigReader
to be able to access the configuration from everywhere.
Methods from __Deref<Target = ConfigReader>
pub fn get(&self, path: &str) -> Option<&Yaml>
[src]
pub fn get(&self, path: &str) -> Option<&Yaml>
Returns whatever it finds in that position
Supports simple path syntax: top/middle/child/node
pub fn get_char(&self, key: &str) -> Option<char>
[src]
pub fn get_char(&self, key: &str) -> Option<char>
Returns the first character.
Panics
This panics if nothing is found. You should have a default config for everything that you use.
pub fn get_str_or(&self, key: &str) -> Option<&str>
[src]
pub fn get_str_or(&self, key: &str) -> Option<&str>
Returns the string in the position or an empty string
pub fn var_get_str(&self, key: &str) -> String
[src]
pub fn var_get_str(&self, key: &str) -> String
Returns the string in the position or an empty string
pub fn get_str(&self, key: &str) -> &str
[src]
pub fn get_str(&self, key: &str) -> &str
Returns the string in the position or an empty string
pub fn get_strs(&self, key: &str) -> Option<Vec<&str>>
[src]
pub fn get_strs(&self, key: &str) -> Option<Vec<&str>>
Returns the a vec of &strs if possible
pub fn get_to_string(&self, key: &str) -> String
[src]
pub fn get_to_string(&self, key: &str) -> String
Returns the string in the position or an empty string
Panics
This panics if nothing is found. You should have a default config for everything that you use.
pub fn get_f64(&self, key: &str) -> Option<f64>
[src]
pub fn get_f64(&self, key: &str) -> Option<f64>
Tries to get the config field as float
pub fn get_bool(&self, key: &str) -> bool
[src]
pub fn get_bool(&self, key: &str) -> bool
Returns the boolean in the position or false
Panics
This panics if nothing is found. You should have a default config for everything that you use.
Trait Implementations
impl __Deref for CONFIG
impl __Deref for CONFIG
type Target = ConfigReader
The resulting type after dereferencing.
fn deref(&self) -> &ConfigReader
fn deref(&self) -> &ConfigReader
Dereferences the value.
impl LazyStatic for CONFIG
impl LazyStatic for CONFIG
fn initialize(lazy: &Self)
fn initialize(lazy: &Self)