1
0
mirror of https://github.com/actix/actix-website synced 2024-11-23 16:31:08 +01:00

Fix Item associated type for Stream trait (#332)

The documentation shows incorrect syntax
This commit is contained in:
moy2010 2023-10-12 10:57:41 +02:00 committed by GitHub
parent 2b0bd4e31b
commit 248eff90eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ Let's create a response for a custom type that serializes to an `application/jso
## Streaming response body ## Streaming response body
Response body can be generated asynchronously. In this case, body must implement the stream trait `Stream<Item=Bytes, Error=Error>`, i.e.: Response body can be generated asynchronously. In this case, body must implement the stream trait `Stream<Item = Result<Bytes, Error>>`, i.e.:
<CodeBlock example="async-handlers" file="stream.rs" section="stream" /> <CodeBlock example="async-handlers" file="stream.rs" section="stream" />