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:
parent
2b0bd4e31b
commit
248eff90eb
@ -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" />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user