pub struct ConfigBuilder { /* private fields */ }
Expand description
Builder for the Freedom Config object
Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
Sourcepub fn new() -> ConfigBuilder
pub fn new() -> ConfigBuilder
Construct an empty Config builder
Sourcepub fn environment_from_env(&mut self) -> Result<&mut ConfigBuilder, Error>
pub fn environment_from_env(&mut self) -> Result<&mut ConfigBuilder, Error>
Attempt to load the ATLAS environment from the environment
Sourcepub fn secret_from_env(&mut self) -> Result<&mut ConfigBuilder, Error>
pub fn secret_from_env(&mut self) -> Result<&mut ConfigBuilder, Error>
Attempt to load the ATLAS secret from the environment
Sourcepub fn key_from_env(&mut self) -> Result<&mut ConfigBuilder, Error>
pub fn key_from_env(&mut self) -> Result<&mut ConfigBuilder, Error>
Attempt to load the ATLAS key from the environment
Sourcepub fn environment(&mut self, environment: impl IntoEnv) -> &mut ConfigBuilder
pub fn environment(&mut self, environment: impl IntoEnv) -> &mut ConfigBuilder
Set the environment
Sourcepub fn secret(&mut self, secret: impl Into<String>) -> &mut ConfigBuilder
pub fn secret(&mut self, secret: impl Into<String>) -> &mut ConfigBuilder
Set the secret
Sourcepub fn key(&mut self, key: impl Into<String>) -> &mut ConfigBuilder
pub fn key(&mut self, key: impl Into<String>) -> &mut ConfigBuilder
Set the key
Trait Implementations§
Source§impl Default for ConfigBuilder
impl Default for ConfigBuilder
Source§fn default() -> ConfigBuilder
fn default() -> ConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConfigBuilder
impl !RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl !UnwindSafe for ConfigBuilder
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