pub struct AppConfigBuilder<ConfigExt> { /* private fields */ }Expand description
AppConfig builder to set up multiple sources
Implementations§
Source§impl<ConfigExt> AppConfigBuilder<ConfigExt>
impl<ConfigExt> AppConfigBuilder<ConfigExt>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates new AppConfigBuilder
Sourcepub fn build(self) -> Result<AppConfig<ConfigExt>>where
ConfigExt: Debug + DeserializeOwned,
pub fn build(self) -> Result<AppConfig<ConfigExt>>where
ConfigExt: Debug + DeserializeOwned,
Reads all registered sources
Sourcepub fn add_default(self) -> Self
pub fn add_default(self) -> Self
Add default config
Sourcepub fn add_str(self, str: &str, format: FileFormat) -> Self
pub fn add_str(self, str: &str, format: FileFormat) -> Self
Add string
Sourcepub fn add_env_prefixed(self, prefix: &str) -> Self
pub fn add_env_prefixed(self, prefix: &str) -> Self
Add environment variables with specified prefix and default separator: “_”
Trait Implementations§
Source§impl<ConfigExt: Debug> Debug for AppConfigBuilder<ConfigExt>
impl<ConfigExt: Debug> Debug for AppConfigBuilder<ConfigExt>
Source§impl<ConfigExt: Default> Default for AppConfigBuilder<ConfigExt>
impl<ConfigExt: Default> Default for AppConfigBuilder<ConfigExt>
Source§fn default() -> AppConfigBuilder<ConfigExt>
fn default() -> AppConfigBuilder<ConfigExt>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<ConfigExt> Freeze for AppConfigBuilder<ConfigExt>
impl<ConfigExt> !RefUnwindSafe for AppConfigBuilder<ConfigExt>
impl<ConfigExt> Send for AppConfigBuilder<ConfigExt>where
ConfigExt: Send,
impl<ConfigExt> Sync for AppConfigBuilder<ConfigExt>where
ConfigExt: Sync,
impl<ConfigExt> Unpin for AppConfigBuilder<ConfigExt>where
ConfigExt: Unpin,
impl<ConfigExt> !UnwindSafe for AppConfigBuilder<ConfigExt>
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request