mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-31 02:52:53 +01:00
fix guard mod docs
This commit is contained in:
parent
de1efa673f
commit
8b2b755cde
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -101,7 +101,6 @@ jobs:
|
||||
run: >
|
||||
sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && PATH=$PATH:/usr/share/rust/.cargo/bin && RUSTUP_TOOLCHAIN=stable cargo test --lib --tests -p=actix-files --all-features"
|
||||
|
||||
|
||||
rustdoc:
|
||||
name: doc tests
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -917,9 +917,9 @@
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated actix-web-codegen dependency for access to new `#[route(...)]` multi-method macro.
|
||||
- Updated `actix-web-codegen` dependency for access to new `#[route(...)]` multi-method macro.
|
||||
- Print non-configured `Data<T>` type when attempting extraction. [#1743]
|
||||
- Re-export bytes::Buf{Mut} in web module. [#1750]
|
||||
- Re-export `bytes::Buf{Mut}` in web module. [#1750]
|
||||
- Upgrade `pin-project` to `1.0`.
|
||||
|
||||
[#1723]: https://github.com/actix/actix-web/pull/1723
|
||||
@ -927,6 +927,7 @@
|
||||
[#1748]: https://github.com/actix/actix-web/pull/1748
|
||||
[#1750]: https://github.com/actix/actix-web/pull/1750
|
||||
[#1754]: https://github.com/actix/actix-web/pull/1754
|
||||
[#1757]: https://github.com/actix/actix-web/pull/1757
|
||||
[#1749]: https://github.com/actix/actix-web/pull/1749
|
||||
|
||||
## 3.1.0 - 2020-09-29
|
||||
|
@ -31,7 +31,6 @@ Headings marked with :warning: are **breaking behavioral changes**. They will pr
|
||||
- [Returning `HttpResponse` synchronously](#returning-httpresponse-synchronously)
|
||||
- [`#[actix_web::main]` and `#[tokio::main]`](#actix_webmain-and-tokiomain)
|
||||
- [`web::block`](#webblock)
|
||||
-
|
||||
|
||||
## MSRV
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
//! There are shortcuts for routes with method guards in the [`web`](crate::web) module:
|
||||
//! [`web::get()`](crate::web::get), [`web::post()`](crate::web::post), etc. The routes created by
|
||||
//! the following calls are equivalent:
|
||||
//!
|
||||
//! - `web::get()` (recommended form)
|
||||
//! - `web::route().guard(guard::Get())`
|
||||
//!
|
||||
@ -28,9 +29,11 @@
|
||||
//! would result in inaccessible routes. See the [`Host`] guard for an example of virtual hosting.
|
||||
//!
|
||||
//! # Examples
|
||||
//!
|
||||
//! In the following code, the `/guarded` resource has one defined route whose handler will only be
|
||||
//! called if the request method is `POST` and there is a request header with name and value equal
|
||||
//! to `x-guarded` and `secret`, respectively.
|
||||
//! called if the request method is GET or POST and there is a `x-guarded` request header with value
|
||||
//! equal to `secret`.
|
||||
//!
|
||||
//! ```
|
||||
//! use actix_web::{web, http::Method, guard, HttpResponse};
|
||||
//!
|
||||
|
Loading…
x
Reference in New Issue
Block a user