pub struct ApplicationConfig { /* private fields */ }Expand description
Configuration values for an application.
Implementations§
Source§impl ApplicationConfig
impl ApplicationConfig
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Constructs a new instance of ApplicationConfig.
Sourcepub fn with_tracing_subscribe(self, value: bool) -> Self
pub fn with_tracing_subscribe(self, value: bool) -> Self
Configure whether or not tracing will subscribe when you call run.
This will install a global tracing subscriber with recommended settings for you.
Sourcepub fn with_tracing_panics(self, value: bool) -> Self
pub fn with_tracing_panics(self, value: bool) -> Self
Configure whether or not tracing will be used to catch panics globally.
This will install a global panic hook that will log panics using tracing.
Sourcepub fn with_graceful_shutdown(self, value: bool) -> Self
pub fn with_graceful_shutdown(self, value: bool) -> Self
Configure whether or not to listen for shutdown signals and allow the program to cleanup processes before closing.
Sourcepub fn with_graceful_shutdown_timeout(self, duration: Duration) -> Self
pub fn with_graceful_shutdown_timeout(self, duration: Duration) -> Self
Configure the maximum amount of time to wait for the application to shutdown before exiting.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApplicationConfig
impl RefUnwindSafe for ApplicationConfig
impl Send for ApplicationConfig
impl Sync for ApplicationConfig
impl Unpin for ApplicationConfig
impl UnwindSafe for ApplicationConfig
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