pub struct BootApplicationBuilder { /* private fields */ }Expand description
Builder for a BootApplication.
Implementations§
Source§impl BootApplicationBuilder
impl BootApplicationBuilder
pub fn new() -> Self
Sourcepub fn import_arc(self, module: Arc<dyn Module>) -> Self
pub fn import_arc(self, module: Arc<dyn Module>) -> Self
Import a shared root module.
Sourcepub fn route(self, route: RouteDefinition) -> Self
pub fn route(self, route: RouteDefinition) -> Self
Add a framework-neutral route directly to the application shell.
Sourcepub fn global_prefix(self, prefix: impl Into<String>) -> Self
pub fn global_prefix(self, prefix: impl Into<String>) -> Self
Prefix every route in the built application, for example /api/v1.
Sourcepub fn use_global_pipe<P>(self, pipe: P) -> Selfwhere
P: Pipe,
pub fn use_global_pipe<P>(self, pipe: P) -> Selfwhere
P: Pipe,
Add an application-wide pipe, similar to Nest’s global pipes.
Sourcepub fn use_global_guard<G>(self, guard: G) -> Selfwhere
G: Guard,
pub fn use_global_guard<G>(self, guard: G) -> Selfwhere
G: Guard,
Add an application-wide guard, similar to Nest’s global guards.
Sourcepub fn use_global_interceptor<I>(self, interceptor: I) -> Selfwhere
I: Interceptor,
pub fn use_global_interceptor<I>(self, interceptor: I) -> Selfwhere
I: Interceptor,
Add an application-wide interceptor, similar to Nest’s global interceptors.
Sourcepub fn use_global_filter<F>(self, filter: F) -> Selfwhere
F: ExceptionFilter,
pub fn use_global_filter<F>(self, filter: F) -> Selfwhere
F: ExceptionFilter,
Add an application-wide exception filter, similar to Nest’s global filters.
Sourcepub fn build(self) -> Result<BootApplication>
pub fn build(self) -> Result<BootApplication>
Resolve module imports, providers, controllers, and routes.
Trait Implementations§
Source§impl Default for BootApplicationBuilder
impl Default for BootApplicationBuilder
Source§fn default() -> BootApplicationBuilder
fn default() -> BootApplicationBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for BootApplicationBuilder
impl !UnwindSafe for BootApplicationBuilder
impl Freeze for BootApplicationBuilder
impl Send for BootApplicationBuilder
impl Sync for BootApplicationBuilder
impl Unpin for BootApplicationBuilder
impl UnsafeUnpin for BootApplicationBuilder
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