Struct fregate::AppConfigBuilder
source · [−]pub struct AppConfigBuilder<T> { /* private fields */ }
Expand description
AppConfig builder to set up multiple sources
Implementations
sourceimpl<T> AppConfigBuilder<T>
impl<T> AppConfigBuilder<T>
sourcepub fn new() -> Self
pub fn new() -> Self
Creates new AppConfigBuilder
sourcepub fn build(self) -> Result<AppConfig<T>>where
T: Debug + DeserializeOwned,
pub fn build(self) -> Result<AppConfig<T>>where
T: 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
sourceimpl<T: Debug> Debug for AppConfigBuilder<T>
impl<T: Debug> Debug for AppConfigBuilder<T>
sourceimpl<T: Default> Default for AppConfigBuilder<T>
impl<T: Default> Default for AppConfigBuilder<T>
sourcefn default() -> AppConfigBuilder<T>
fn default() -> AppConfigBuilder<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for AppConfigBuilder<T>
impl<T> Send for AppConfigBuilder<T>where
T: Send,
impl<T> Sync for AppConfigBuilder<T>where
T: Sync,
impl<T> Unpin for AppConfigBuilder<T>where
T: Unpin,
impl<T> !UnwindSafe for AppConfigBuilder<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request