Struct tsukuyomi::app::AppBuilder [−][src]
pub struct AppBuilder { /* fields omitted */ }
A builder object for constructing an instance of App
.
Methods
impl AppBuilder
[src]
impl AppBuilder
ⓘImportant traits for &'a mut Rpub fn mount(
&mut self,
base: &str,
f: impl FnOnce(&mut Mount)
) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn mount(
&mut self,
base: &str,
f: impl FnOnce(&mut Mount)
) -> &mut Self
Registers some handlers to the router, with mounting on the specified prefix.
See the documentation of Mount
for details.
ⓘImportant traits for &'a mut Rpub fn router(
&mut self,
f: impl FnOnce(&mut Builder)
) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn router(
&mut self,
f: impl FnOnce(&mut Builder)
) -> &mut Self
Modifies the router level configurations.
ⓘImportant traits for &'a mut Rpub fn error_handler<H>(&mut self, error_handler: H) -> &mut Self where
H: ErrorHandler + Send + Sync + 'static,
[src]
ⓘImportant traits for &'a mut R
pub fn error_handler<H>(&mut self, error_handler: H) -> &mut Self where
H: ErrorHandler + Send + Sync + 'static,
Sets the instance to an error handler into this builder.
ⓘImportant traits for &'a mut Rpub fn modifier<M>(&mut self, modifier: M) -> &mut Self where
M: Modifier + Send + Sync + 'static,
[src]
ⓘImportant traits for &'a mut R
pub fn modifier<M>(&mut self, modifier: M) -> &mut Self where
M: Modifier + Send + Sync + 'static,
Sets the instance to an error handler into this builder.
ⓘImportant traits for &'a mut Rpub fn manage<T>(&mut self, state: T) -> &mut Self where
T: Send + Sync + 'static,
[src]
ⓘImportant traits for &'a mut R
pub fn manage<T>(&mut self, state: T) -> &mut Self where
T: Send + Sync + 'static,
Sets a value of T
to the global storage.
If a value of provided type has already set, this method drops state
immediately
and does not provide any affects to the global storage.
pub fn finish(&mut self) -> Result<App, Error>
[src]
pub fn finish(&mut self) -> Result<App, Error>
Creates a configured App
using the current settings.
Trait Implementations
impl Debug for AppBuilder
[src]
impl Debug for AppBuilder
Auto Trait Implementations
impl Send for AppBuilder
impl Send for AppBuilder
impl Sync for AppBuilder
impl Sync for AppBuilder