[−]Struct asciii::CONFIG
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)
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more