1
0
mirror of https://github.com/actix/actix-website synced 2025-06-29 00:10:36 +02:00

use Bytes re-export

closes #202
This commit is contained in:
Rob Ede
2020-11-27 01:10:05 +00:00
parent c39325a649
commit cdbb5dd2b2
12 changed files with 31 additions and 25 deletions

View File

@ -80,7 +80,7 @@ Actix-web also provides several other extractors:
need access to the request.
* *String* - You can convert a request's payload to a *String*. [*Example*][stringexample]
is available in doc strings.
* *bytes::Bytes* - You can convert a request's payload into *Bytes*.
* *actix_web::web::Bytes* - You can convert a request's payload into *Bytes*.
[*Example*][bytesexample]
is available in doc strings.
* *Payload* - You can access a request's payload.

View File

@ -38,7 +38,7 @@ complex types are involved.
```rust
async fn index(_req: HttpRequest) -> impl Responder {
Bytes::from_static(b"Hello world!")
web::Bytes::from_static(b"Hello world!")
}
```