Struct maelstrom_util::config::ConfigBag
source · pub struct ConfigBag { /* private fields */ }
Implementations§
source§impl ConfigBag
impl ConfigBag
pub fn new( args: ArgMatches, env_prefix: impl Into<String>, env: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, files: impl IntoIterator<Item = (impl Into<PathBuf>, impl Into<String>)> ) -> Result<Self>
pub fn into_args(self) -> ArgMatches
pub fn get<T>(&self, field: &str) -> Result<T>
pub fn get_or_else<T, F>(&self, field: &str, default: F) -> Result<T>
pub fn get_option<T>(&self, field: &str) -> Result<Option<T>>
pub fn get_flag<T>(&self, field: &str) -> Result<Option<T>>
Auto Trait Implementations§
impl Freeze for ConfigBag
impl !RefUnwindSafe for ConfigBag
impl Send for ConfigBag
impl Sync for ConfigBag
impl Unpin for ConfigBag
impl !UnwindSafe for ConfigBag
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