mirror of https://github.com/fafhrd91/actix-web
Add `ServiceConfig::configure`
This commit is contained in:
parent
7fa6333a0c
commit
d9938d4909
|
@ -1,11 +1,13 @@
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## Unreleased - 2021-xx-xx
|
## Unreleased - 2021-xx-xx
|
||||||
|
### Added
|
||||||
|
* Added `ServiceConfig::configure` to allow easy nesting of configuration. [#1988]
|
||||||
### Changed
|
### Changed
|
||||||
* Feature `cookies` is now optional and enabled by default. [#1981]
|
* Feature `cookies` is now optional and enabled by default. [#1981]
|
||||||
|
|
||||||
[#1981]: https://github.com/actix/actix-web/pull/1981
|
[#1981]: https://github.com/actix/actix-web/pull/1981
|
||||||
|
[#1988]: https://github.com/actix/actix-web/pull/1988
|
||||||
|
|
||||||
## 4.0.0-beta.3 - 2021-02-10
|
## 4.0.0-beta.3 - 2021-02-10
|
||||||
* Update `actix-web-codegen` to `0.5.0-beta.1`.
|
* Update `actix-web-codegen` to `0.5.0-beta.1`.
|
||||||
|
|
|
@ -199,6 +199,17 @@ impl ServiceConfig {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Run external configuration as part of the application building process
|
||||||
|
///
|
||||||
|
/// Counterpart to [`App::configure()`](crate::App::configure) that allows for easy nesting.
|
||||||
|
pub fn configure<F>(&mut self, f: F) -> &mut Self
|
||||||
|
where
|
||||||
|
F: FnOnce(&mut ServiceConfig),
|
||||||
|
{
|
||||||
|
f(self);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
/// Configure route for a specific path.
|
/// Configure route for a specific path.
|
||||||
///
|
///
|
||||||
/// Counterpart to [`App::route()`](crate::App::route).
|
/// Counterpart to [`App::route()`](crate::App::route).
|
||||||
|
|
Loading…
Reference in New Issue