pub struct ConfigService { /* private fields */ }Implementations§
Source§impl ConfigService
impl ConfigService
pub fn new() -> ConfigService
pub fn load() -> Result<ConfigService, ConfigError>
pub fn load_with_options( options: &ConfigOptions, ) -> Result<ConfigService, ConfigError>
pub fn get(&self, key: &str) -> Option<&str>
pub fn get_string(&self, key: &str) -> String
pub fn get_string_or(&self, key: &str, default: &str) -> String
pub fn get_i32(&self, key: &str) -> i32
pub fn get_i32_or(&self, key: &str, default: i32) -> i32
pub fn get_u16(&self, key: &str) -> u16
pub fn get_u16_or(&self, key: &str, default: u16) -> u16
pub fn get_u32(&self, key: &str) -> u32
pub fn get_u32_or(&self, key: &str, default: u32) -> u32
pub fn get_bool(&self, key: &str) -> bool
pub fn get_bool_or(&self, key: &str, default: bool) -> bool
pub fn get_usize(&self, key: &str) -> usize
pub fn get_usize_or(&self, key: &str, default: usize) -> usize
pub fn get_f64(&self, key: &str) -> f64
pub fn get_f64_or(&self, key: &str, default: f64) -> f64
pub fn get_isize(&self, key: &str) -> isize
pub fn get_isize_or(&self, key: &str, default: isize) -> isize
pub fn get_i64(&self, key: &str) -> i64
pub fn get_i64_or(&self, key: &str, default: i64) -> i64
pub fn get_u64(&self, key: &str) -> u64
pub fn get_u64_or(&self, key: &str, default: u64) -> u64
pub fn has(&self, key: &str) -> bool
Trait Implementations§
Source§impl Clone for ConfigService
impl Clone for ConfigService
Source§fn clone(&self) -> ConfigService
fn clone(&self) -> ConfigService
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigService
impl Debug for ConfigService
Source§impl Default for ConfigService
impl Default for ConfigService
Source§fn default() -> ConfigService
fn default() -> ConfigService
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConfigService
impl RefUnwindSafe for ConfigService
impl Send for ConfigService
impl Sync for ConfigService
impl Unpin for ConfigService
impl UnsafeUnpin for ConfigService
impl UnwindSafe for ConfigService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more