mirror of
https://github.com/actix/actix-web.git
synced 2024-12-22 16:16:40 +00:00
updated scope wrap doc
This commit is contained in:
parent
03dfbdfcdd
commit
3dd3f7bc92
1 changed files with 7 additions and 5 deletions
12
src/scope.rs
12
src/scope.rs
|
@ -203,9 +203,10 @@ where
|
||||||
/// Registers middleware, in the form of a middleware component (type),
|
/// Registers middleware, in the form of a middleware component (type),
|
||||||
/// that runs during inbound processing in the request
|
/// that runs during inbound processing in the request
|
||||||
/// lifecycle (request -> response), modifying request as
|
/// lifecycle (request -> response), modifying request as
|
||||||
/// necessary, across all requests managed by the *Scope*. Note that
|
/// necessary, across all requests managed by the *Scope*. Scope-level
|
||||||
/// Scope-level middleware is only used for inbound requests, not outbound
|
/// middleware is more limited in what it can modify, relative to Route or
|
||||||
/// responses.
|
/// Application level middleware, in that Scope-level middleware can not modify
|
||||||
|
/// ServiceResponse.
|
||||||
///
|
///
|
||||||
/// Use middleware when you need to read or modify *every* request in some way.
|
/// Use middleware when you need to read or modify *every* request in some way.
|
||||||
pub fn wrap<M, F>(
|
pub fn wrap<M, F>(
|
||||||
|
@ -244,8 +245,9 @@ where
|
||||||
/// Registers middleware, in the form of a closure, that runs during inbound
|
/// Registers middleware, in the form of a closure, that runs during inbound
|
||||||
/// processing in the request lifecycle (request -> response), modifying
|
/// processing in the request lifecycle (request -> response), modifying
|
||||||
/// request as necessary, across all requests managed by the *Scope*.
|
/// request as necessary, across all requests managed by the *Scope*.
|
||||||
/// Note that Scope-level middleware is only used for inbound requests,
|
/// Scope-level middleware is more limited in what it can modify, relative
|
||||||
/// not outbound responses.
|
/// to Route or Application level middleware, in that Scope-level middleware
|
||||||
|
/// can not modify ServiceResponse.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use actix_service::Service;
|
/// use actix_service::Service;
|
||||||
|
|
Loading…
Reference in a new issue