pub struct ApplicationBuilder { /* private fields */ }
Expand description
Builder for constructing applications
Implementations§
Source§impl ApplicationBuilder
impl ApplicationBuilder
pub fn new() -> Self
Sourcepub fn provider<P: ServiceProvider + 'static>(self, provider: P) -> Self
pub fn provider<P: ServiceProvider + 'static>(self, provider: P) -> Self
Add a service provider to the application
Sourcepub fn lifecycle_hook<H: LifecycleHook + 'static>(self, hook: H) -> Self
pub fn lifecycle_hook<H: LifecycleHook + 'static>(self, hook: H) -> Self
Add a lifecycle hook to the application
Sourcepub fn shutdown_timeout(self, timeout: Duration) -> Self
pub fn shutdown_timeout(self, timeout: Duration) -> Self
Set shutdown timeout (default: 30 seconds)
Sourcepub fn build(self) -> Result<Application, ApplicationError>
pub fn build(self) -> Result<Application, ApplicationError>
Build the application by resolving dependencies and creating container
Auto Trait Implementations§
impl Freeze for ApplicationBuilder
impl !RefUnwindSafe for ApplicationBuilder
impl Send for ApplicationBuilder
impl Sync for ApplicationBuilder
impl Unpin for ApplicationBuilder
impl !UnwindSafe for ApplicationBuilder
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