Struct ntex::web::ServiceConfig [−][src]
pub struct ServiceConfig<Err = DefaultError> { /* fields omitted */ }
Expand description
Service config is used for external configuration. Part of application configuration could be offloaded to set of external methods. This could help with modularization of big application configuration.
Implementations
Set application data. Application data could be accessed
by using Data<T>
extractor where T
is data type.
This is same as App::data()
method.
Configure route for a specific path.
This is same as App::route()
method.
pub fn service<F>(&mut self, factory: F) -> &mut Self where
F: WebServiceFactory<Err> + 'static,
pub fn service<F>(&mut self, factory: F) -> &mut Self where
F: WebServiceFactory<Err> + 'static,
Register http service.
This is same as App::service()
method.
Register an external resource.
External resources are useful for URL generation purposes only
and are never considered for matching at request time. Calls to
HttpRequest::url_for()
will work as expected.
This is same as App::external_service()
method.